summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--log.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/log.c b/log.c
index c114c41..11edb52 100644
--- a/log.c
+++ b/log.c
@@ -109,15 +109,15 @@ void logFormat(uint id, const time_t *src, const char *format, ...) {
 
 	char buf[sizeof("0000-00-00T00:00:00+0000")];
 	strftime(buf, sizeof(buf), "%FT%T%z", tm);
-	fprintf(file, "[%s] ", buf);
-	if (ferror(file)) err(EX_IOERR, "%s", idNames[id]);
+	int n = fprintf(file, "[%s] ", buf);
+	if (n < 0) err(EX_IOERR, "%s", idNames[id]);
 
 	va_list ap;
 	va_start(ap, format);
-	vfprintf(file, format, ap);
+	n = vfprintf(file, format, ap);
 	va_end(ap);
-	if (ferror(file)) err(EX_IOERR, "%s", idNames[id]);
+	if (n < 0) err(EX_IOERR, "%s", idNames[id]);
 
-	fprintf(file, "\n");
-	if (ferror(file)) err(EX_IOERR, "%s", idNames[id]);
+	n = fprintf(file, "\n");
+	if (n < 0) err(EX_IOERR, "%s", idNames[id]);
 }
8-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe 2018-08-04Handle /topicJune McEnroe