diff options
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/command.c | 6 | ||||
-rw-r--r-- | src/helper/fileio.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/helper/command.c b/src/helper/command.c index 681e870..42cb8c7 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -815,9 +815,9 @@ static COMMAND_HELPER(command_help_show, struct help_entry *c, /* If the match string occurs anywhere, we print out * stuff for this command. */ - bool is_match = (strstr(c->cmd_name, cmd_match) != NULL) || - ((c->usage) && (strstr(c->usage, cmd_match) != NULL)) || - ((c->help) && (strstr(c->help, cmd_match) != NULL)); + bool is_match = strstr(c->cmd_name, cmd_match) || + (c->usage && strstr(c->usage, cmd_match)) || + (c->help && strstr(c->help, cmd_match)); if (is_match) { if (c->usage && strlen(c->usage) > 0) { 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; |