(svn r26486) -Codechange: replace a number of snprintfs with seprintf
This commit is contained in:
@@ -113,7 +113,7 @@ static void debug_print(const char *dbg, const char *buf)
|
||||
if (_debug_socket != INVALID_SOCKET) {
|
||||
char buf2[1024 + 32];
|
||||
|
||||
snprintf(buf2, lengthof(buf2), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf);
|
||||
seprintf(buf2, lastof(buf2), "%sdbg: [%s] %s\n", GetLogPrefix(), dbg, buf);
|
||||
/* Sending out an error when this fails would be nice, however... the error
|
||||
* would have to be send over this failing socket which won't work. */
|
||||
send(_debug_socket, buf2, (int)strlen(buf2), 0);
|
||||
@@ -238,10 +238,10 @@ const char *GetDebugString()
|
||||
|
||||
memset(dbgstr, 0, sizeof(dbgstr));
|
||||
i = debug_level;
|
||||
snprintf(dbgstr, sizeof(dbgstr), "%s=%d", i->name, *i->level);
|
||||
seprintf(dbgstr, lastof(dbgstr), "%s=%d", i->name, *i->level);
|
||||
|
||||
for (i++; i != endof(debug_level); i++) {
|
||||
snprintf(dbgval, sizeof(dbgval), ", %s=%d", i->name, *i->level);
|
||||
seprintf(dbgval, lastof(dbgval), ", %s=%d", i->name, *i->level);
|
||||
strecat(dbgstr, dbgval, lastof(dbgstr));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user