]> code.citadel.org Git - citadel.git/blobdiff - citadel/sendcommand.c
* Holy war on strlen: use IsEmptyStr where apropriate.
[citadel.git] / citadel / sendcommand.c
index d1619fea55037004d802bddb4c9fd14f4a29835a..4c23a6d350cad80b9fec137c530608c8e83d7ab3 100644 (file)
@@ -33,7 +33,6 @@
 #include "tools.h"
 #include "citadel_ipc.h"
 #include "server.h"
-#include "serv_extensions.h"
 #include "config.h"
 
 #define LOCKFILE "/tmp/LCK.sendcommand"
@@ -168,7 +167,7 @@ int main(int argc, char **argv)
                        home_specified = 1;
                        home=1;
                } else {
-                       if (strlen(cmd) > 0)
+                       if (!IsEmptyStr(cmd))
                                strcat(cmd, " ");
                        strcat(cmd, argv[a]);
                }
@@ -207,10 +206,10 @@ int main(int argc, char **argv)
                do {
                        if (fgets(buf, sizeof buf, stdin) == NULL)
                                strcpy(buf, "000");
-                       if (strlen(buf) > 0)
+                       if (!IsEmptyStr(buf))
                                if (buf[strlen(buf) - 1] == '\n')
                                        buf[strlen(buf) - 1] = 0;
-                       if (strlen(buf) > 0)
+                       if (!IsEmptyStr(buf))
                                if (buf[strlen(buf) - 1] == '\r')
                                        buf[strlen(buf) - 1] = 0;
                        if (strcmp(buf, "000"))