diff options
author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2004-07-31 14:22:02 +0000 |
---|---|---|
committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2004-07-31 14:22:02 +0000 |
commit | a57e1ef0700fcfb5fa89a7ab1bdb20e0d04c11aa (patch) | |
tree | baf7799555982ab2cc077cf43cae1f4d4c7af9d1 /libexec/ftpd/ftpd.c | |
parent | aa087e0e129c2337f187f71bf8a502bdce9f5464 (diff) | |
download | src-a57e1ef0700fcfb5fa89a7ab1bdb20e0d04c11aa.tar.gz src-a57e1ef0700fcfb5fa89a7ab1bdb20e0d04c11aa.zip |
Printf(3) off_t values through conversion to intmax_t since
we've got <stdint.h> et al now. (This makes ftpd(8) WARNS=2 clean.)
Notes
Notes:
svn path=/head/; revision=132929
Diffstat (limited to 'libexec/ftpd/ftpd.c')
-rw-r--r-- | libexec/ftpd/ftpd.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 96e08d140230..b894b6835514 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -80,6 +80,7 @@ static const char rcsid[] = #include <grp.h> #include <opie.h> #include <signal.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -229,8 +230,9 @@ char proctitle[LINE_MAX]; /* initial part of title */ syslog(LOG_INFO,"%s %s%s", cmd, \ *(file) == '/' ? "" : curdir(), file); \ else \ - syslog(LOG_INFO, "%s %s%s = %qd bytes", \ - cmd, (*(file) == '/') ? "" : curdir(), file, cnt); \ + syslog(LOG_INFO, "%s %s%s = %jd bytes", \ + cmd, (*(file) == '/') ? "" : curdir(), file, \ + (intmax_t)cnt); \ } #ifdef VIRTUAL_HOSTING @@ -1882,7 +1884,8 @@ dataconn(char *name, off_t size, char *mode) file_size = size; byte_count = 0; if (size != (off_t) -1) - (void) snprintf(sizebuf, sizeof(sizebuf), " (%qd bytes)", size); + (void) snprintf(sizebuf, sizeof(sizebuf), + " (%jd bytes)", (intmax_t)size); else *sizebuf = '\0'; if (pdata >= 0) { @@ -2656,10 +2659,11 @@ myoob(void) if (strcmp(cp, "STAT\r\n") == 0) { tmpline[0] = '\0'; if (file_size != (off_t) -1) - reply(213, "Status: %qd of %qd bytes transferred", - byte_count, file_size); + reply(213, "Status: %jd of %jd bytes transferred", + (intmax_t)byte_count, (intmax_t)file_size); else - reply(213, "Status: %qd bytes transferred", byte_count); + reply(213, "Status: %jd bytes transferred", + (intmax_t)byte_count); } } |