Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use strlcat() strlcpy() and slprintf() whenever possible to avoid any
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
068b5a9
..
8be3605
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-23,6
+23,7
@@
*/
#include "rsync.h"
*/
#include "rsync.h"
+
/* this is the rsync debugging function. Call it with FINFO or FERROR */
void rprintf(int fd, const char *format, ...)
{
/* this is the rsync debugging function. Call it with FINFO or FERROR */
void rprintf(int fd, const char *format, ...)
{
@@
-33,13
+34,7
@@
void rprintf(int fd, const char *format, ...)
extern int am_daemon;
va_start(ap, format);
extern int am_daemon;
va_start(ap, format);
-
-#if HAVE_VSNPRINTF
- len = vsnprintf(buf, sizeof(buf)-1, format, ap);
-#else
- vsprintf(buf, format, ap);
- len = strlen(buf);
-#endif
+ len = vslprintf(buf, sizeof(buf)-1, format, ap);
va_end(ap);
if (len < 0) exit_cleanup(1);
va_end(ap);
if (len < 0) exit_cleanup(1);