From: Michael Stapelberg Date: Wed, 2 May 2012 18:07:59 +0000 (+0200) Subject: log.c: len is always positive, remove useless check (Thanks Marcus) X-Git-Tag: 4.3~236^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=280a35717bbb6c6f0ba5e97bf48f5e8b9a0d98a5;p=i3%2Fi3 log.c: len is always positive, remove useless check (Thanks Marcus) --- diff --git a/src/log.c b/src/log.c index 768ce92b..92e8f57c 100644 --- a/src/log.c +++ b/src/log.c @@ -210,11 +210,6 @@ static void vlog(const bool print, const char *fmt, va_list args) { vprintf(fmt, args); } else { 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)) { fprintf(stderr, "BUG: single log message > 4k\n"); }