aboutsummaryrefslogtreecommitdiff
path: root/src/helper/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/fileio.c')
-rw-r--r--src/helper/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/fileio.c b/src/helper/fileio.c
index d544b85..cec7dec 100644
--- a/src/helper/fileio.c
+++ b/src/helper/fileio.c
@@ -208,7 +208,7 @@ int fileio_read_u32(struct fileio *fileio, uint32_t *data)
static int fileio_local_fgets(struct fileio *fileio, size_t size, void *buffer)
{
- if (fgets(buffer, size, fileio->file) == NULL)
+ if (!fgets(buffer, size, fileio->file))
return ERROR_FILEIO_OPERATION_FAILED;
return ERROR_OK;