]> code.citadel.org Git - citadel.git/blobdiff - citadel/citserver.c
* Began an effort to eliminate SIZ wherever possible, and use string
[citadel.git] / citadel / citserver.c
index 909bdfd24c0138811d9887694d9cca4215b2dc30..cb73a2ad6f8ea83817b687203496239cb029118a 100644 (file)
@@ -446,7 +446,7 @@ void cmd_mesg(char *mname)
        }
        cprintf("%d %s\n",LISTING_FOLLOWS,buf);
 
-       while (fgets(buf, (SIZ-1), mfp)!=NULL) {
+       while (fgets(buf, (sizeof buf - 1), mfp) != NULL) {
                buf[strlen(buf)-1] = 0;
                do_help_subst(buf);
                cprintf("%s\n",buf);
@@ -821,7 +821,7 @@ void citproto_begin_session() {
  * This loop recognizes all server commands.
  */
 void do_command_loop(void) {
-       char cmdbuf[SIZ];
+       char cmdbuf[1024];
 
        time(&CC->lastcmd);
        memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
@@ -851,8 +851,7 @@ void do_command_loop(void) {
           && (strncasecmp(cmdbuf, "PEXP", 4))
           && (strncasecmp(cmdbuf, "GEXP", 4)) ) {
                strcpy(CC->lastcmdname, "    ");
-               safestrncpy(CC->lastcmdname, cmdbuf, 
-                       sizeof(CC->lastcmdname) );
+               safestrncpy(CC->lastcmdname, cmdbuf, sizeof(CC->lastcmdname));
                time(&CC->lastidle);
        }
                
@@ -863,11 +862,11 @@ void do_command_loop(void) {
           CC->cs_flags &= ~CS_POSTING;
        }
                   
-       if (!strncasecmp(cmdbuf,"NOOP",4)) {
+       if (!strncasecmp(cmdbuf, "NOOP", 4)) {
                cprintf("%d%cok\n", CIT_OK, CtdlCheckExpress() );
        }
        
-       else if (!strncasecmp(cmdbuf,"QNOP",4)) {
+       else if (!strncasecmp(cmdbuf, "QNOP", 4)) {
                /* do nothing, this command returns no response */
        }