From 4809a88897173cecff92433816e872b505426f88 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 27 Jan 2016 21:53:13 +0100 Subject: [PATCH] correct errno to boolean --- Clean System Files/readLine.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Clean System Files/readLine.c b/Clean System Files/readLine.c index c73bc06..e3f4def 100644 --- a/Clean System Files/readLine.c +++ b/Clean System Files/readLine.c @@ -247,7 +247,7 @@ int cleanReadHistory(CleanString path) char *cs_path = cleanStringToCString(path); int errno = read_history(cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanReadHistoryRange(CleanString path, int from, int to) @@ -255,7 +255,7 @@ int cleanReadHistoryRange(CleanString path, int from, int to) char *cs_path = cleanStringToCString(path); int errno = read_history_range(cs_path, from, to); free(cs_path); - return errno; + return errno == 0; } int cleanWriteHistory(CleanString path) @@ -263,7 +263,7 @@ int cleanWriteHistory(CleanString path) char *cs_path = cleanStringToCString(path); int errno = write_history(cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanAppendHistory(int n, CleanString path) @@ -271,7 +271,7 @@ int cleanAppendHistory(int n, CleanString path) char *cs_path = cleanStringToCString(path); int errno = append_history(n, cs_path); free(cs_path); - return errno; + return errno == 0; } int cleanHistoryTruncateFile(CleanString path, int nlines) @@ -279,5 +279,5 @@ int cleanHistoryTruncateFile(CleanString path, int nlines) char *cs_path = cleanStringToCString(path); int errno = history_truncate_file(cs_path, nlines); free(cs_path); - return errno; + return errno == 0; } -- 2.20.1