diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-07 06:59:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-07 06:59:37 +0000 |
commit | 8950ac03f8fd0fb645c7d2374195ea884d091f72 (patch) | |
tree | 705b70626cedad8fef430f5046dc73257d95d773 /log.c | |
parent | 26ef00bd3c6c66240a4640aa54db1106d8b901fc (diff) | |
download | rsync-8950ac03f8fd0fb645c7d2374195ea884d091f72.tar.gz rsync-8950ac03f8fd0fb645c7d2374195ea884d091f72.tar.bz2 rsync-8950ac03f8fd0fb645c7d2374195ea884d091f72.zip |
imported new snprintf.c from samba, got rid of slprintf
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -286,7 +286,7 @@ void rprintf(enum logcode code, const char *format, ...) int len; va_start(ap, format); - len = vslprintf(buf, sizeof(buf), format, ap); + len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len > sizeof(buf)-1) exit_cleanup(RERR_MESSAGEIO); @@ -311,7 +311,7 @@ void rsyserr(enum logcode code, int errcode, const char *format, ...) char *sysmsg; va_start(ap, format); - len = vslprintf(buf, sizeof(buf), format, ap); + len = vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); if (len > sizeof(buf)-1) exit_cleanup(RERR_MESSAGEIO); @@ -392,18 +392,18 @@ static void log_formatted(enum logcode code, case 'h': if (am_daemon) n = client_name(0); break; case 'a': if (am_daemon) n = client_addr(0); break; case 'l': - slprintf(buf2,sizeof(buf2),"%.0f", + snprintf(buf2,sizeof(buf2),"%.0f", (double)file->length); n = buf2; break; case 'p': - slprintf(buf2,sizeof(buf2),"%d", + snprintf(buf2,sizeof(buf2),"%d", (int)getpid()); n = buf2; break; case 'o': n = op; break; case 'f': - slprintf(buf2, sizeof(buf2), "%s/%s", + snprintf(buf2, sizeof(buf2), "%s/%s", file->basedir?file->basedir:"", f_name(file)); clean_fname(buf2); @@ -422,7 +422,7 @@ static void log_formatted(enum logcode code, b = stats.total_read - initial_stats->total_read; } - slprintf(buf2,sizeof(buf2),"%.0f", (double)b); + snprintf(buf2,sizeof(buf2),"%.0f", (double)b); n = buf2; break; case 'c': @@ -433,7 +433,7 @@ static void log_formatted(enum logcode code, b = stats.total_read - initial_stats->total_read; } - slprintf(buf2,sizeof(buf2),"%.0f", (double)b); + snprintf(buf2,sizeof(buf2),"%.0f", (double)b); n = buf2; break; } |