}
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);
* 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 */
&& (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);
}
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 */
}