diff options
Diffstat (limited to 'src/general.c')
-rw-r--r-- | src/general.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/general.c b/src/general.c index 1b11bd8..e3d4f96 100644 --- a/src/general.c +++ b/src/general.c @@ -14,6 +14,9 @@ /* * Reads size bytes into the destination buffer from filename. * + * On success, true is returned. Otherwise, false is returned and the content + * of destination is left untouched. + * */ bool slurp(const char *filename, char *destination, int size) { int fd; @@ -27,7 +30,7 @@ bool slurp(const char *filename, char *destination, int size) { destination[n] = '\0'; (void)close(fd); - return true; + return n != -1; } /* |