log.c: len is always positive, remove useless check (Thanks Marcus)
This commit is contained in:
parent
07a385bb7a
commit
280a35717b
|
@ -210,11 +210,6 @@ static void vlog(const bool print, const char *fmt, va_list args) {
|
||||||
vprintf(fmt, args);
|
vprintf(fmt, args);
|
||||||
} else {
|
} else {
|
||||||
len += vsnprintf(message + len, sizeof(message) - len, fmt, args);
|
len += vsnprintf(message + len, sizeof(message) - len, fmt, args);
|
||||||
if (len < 0 ) {
|
|
||||||
fprintf(stderr, "BUG: something is overflowing here. Dropping the log entry\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (len >= sizeof(message)) {
|
if (len >= sizeof(message)) {
|
||||||
fprintf(stderr, "BUG: single log message > 4k\n");
|
fprintf(stderr, "BUG: single log message > 4k\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue