Skip to content

Commit

Permalink
Fix redundant NULL checks
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Jan 24, 2025
1 parent f7b46de commit bce63dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/suggestions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ check_cmds(char *str, size_t len, const int print)
return NO_MATCH;

char *cmd = str;
if (cmd && *cmd == '\\' && *(cmd + 1)) {
if (*cmd == '\\' && *(cmd + 1)) {
cmd++;
len--;
}
Expand Down
2 changes: 1 addition & 1 deletion src/trash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ list_ok_trashed_files(char **args, const int *trashed, const size_t trashed_n)

print_file_name(name, 0);

if (tmp && tmp != p)
if (tmp != p)
free(tmp);
if (p && p != args[trashed[i]])
free(p);
Expand Down

0 comments on commit bce63dc

Please sign in to comment.