r11777@Kushana: nickm | 2007-01-01 21:01:10 -0500

Fix an idiot bug in r9181: snprintf returns <0 on error, not !=0.


svn:r9232
This commit is contained in:
Nick Mathewson 2007-01-02 02:01:15 +00:00
parent 09d98baa86
commit 6ae3ba9b2d

View File

@ -1565,7 +1565,7 @@ generate_v2_networkstatus(void)
const char *eos = find_whitespace(ri->platform+4);
char *platform = tor_strndup(ri->platform+4, eos-(ri->platform+4));
if (tor_snprintf(outp, endp-outp,
"opt v %s\n", platform)) {
"opt v %s\n", platform)<0) {
log_warn(LD_BUG, "Unable to print router version.");
goto done;
}