Skip to content

Commit

Permalink
rutil: fix some compile warnings
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@10379 ddefafc4-47db-0310-ae44-fa13212b10f2
  • Loading branch information
dpocock committed Aug 19, 2013
1 parent 45bda6f commit 5f67585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rutil/Log.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ Log::timestamp(Data& res)
char msbuf[5];
/* Dividing (without remainder) by 1000 rounds the microseconds
measure to the nearest millisecond. */
sprintf(msbuf, ".%3.3ld", long(tv.tv_usec / 1000));
snprintf(msbuf, 5, ".%3.3ld", long(tv.tv_usec / 1000));

int datebufCharsRemaining = datebufSize - (int)strlen(datebuf);
strncat (datebuf, msbuf, datebufCharsRemaining - 1);
Expand Down

0 comments on commit 5f67585

Please sign in to comment.