Index: uspace/lib/c/include/io/klog.h
===================================================================
--- uspace/lib/c/include/io/klog.h	(revision d5c1051faf4391647834d99babdd4a44ee5d9700)
+++ uspace/lib/c/include/io/klog.h	(revision 1569a9b70f7219a7103788305e4baf473da24376)
@@ -49,10 +49,10 @@
 #define KLOG_PRINTF(lvl, fmt, ...) ({ \
 	char *_s; \
-	int _c = asprintf(&_s, fmt, ##__VA_ARGS__); \
-	if (_c >= 0) { \
-		_c = klog_write((lvl), _s, str_size(_s)); \
+	int _rc = ENOMEM; \
+	if (asprintf(&_s, fmt, ##__VA_ARGS__) >= 0) { \
+		_rc = klog_write((lvl), _s, str_size(_s)); \
 		free(_s); \
 	}; \
-	(_c >= 0); \
+	(_rc != EOK); \
 })
 
