]> code.citadel.org Git - citadel.git/blobdiff - citadel/file_ops.c
more sprintf removals
[citadel.git] / citadel / file_ops.c
index b414dcb07de38e68a571a8484f305f15f6bfb631..f6b3c90fcb3a83629e92492299eb9121f523d03a 100644 (file)
@@ -263,7 +263,7 @@ void cmd_netf(char *cmdbuf)
        }
        snprintf(buf, sizeof buf, "sysop@%s", destsys);
        e = alias(buf);
-       if (e != MES_BINARY) {
+       if (e != MES_IGNET) {
                cprintf("%d No such system: '%s'\n",
                        ERROR + NO_SUCH_SYSTEM, destsys);
                return;
@@ -425,7 +425,7 @@ void cmd_oimg(char *cmdbuf)
                snprintf(pathname, sizeof pathname,
                         "./images/floor.%d.gif", which_floor);
        } else if (!strcasecmp(filename, "_roompic_")) {
-               assoc_file_name(pathname, &CC->quickroom, "images");
+               assoc_file_name(pathname, sizeof pathname, &CC->quickroom, "images");
        } else {
                for (a = 0; a < strlen(filename); ++a) {
                        filename[a] = tolower(filename[a]);
@@ -557,7 +557,7 @@ void cmd_uimg(char *cmdbuf)
        }
 
        if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
-               assoc_file_name(CC->upl_path, &CC->quickroom, "images");
+               assoc_file_name(CC->upl_path, sizeof CC->upl_path, &CC->quickroom, "images");
        }
 
        if (strlen(CC->upl_path) == 0) {
@@ -661,7 +661,7 @@ void cmd_ucls(char *cmd)
                }
 
                /* put together an upload notice */
-               sprintf(upload_notice,
+               snprintf(upload_notice, sizeof upload_notice,
                        "NEW UPLOAD: '%s'\n %s\n",
                        CC->upl_file, CC->upl_comment);
                quickie_message(CC->curr_user, NULL, CC->quickroom.QRname,
@@ -780,7 +780,7 @@ void cmd_ndop(char *cmdbuf)
        CC->dl_is_net = 1;
 
        stat(pathname, &statbuf);
-       cprintf("%d %ld\n", OK, statbuf.st_size);
+       cprintf("%d %ld\n", OK, (long)statbuf.st_size);
 }
 
 /*