Skip to content

Commit

Permalink
lib-dict: Add extra NULL-check to make static analyzer happier
Browse files Browse the repository at this point in the history
str_array_length() already checked NULL internally though.
  • Loading branch information
sirainen committed Nov 21, 2016
1 parent 52d2b35 commit cacaa94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-dict/dict-client.c
Expand Up @@ -872,7 +872,8 @@ dict_warnings_sec(const struct client_dict_cmd *cmd, int msecs,
str_printfa(str, ", async-id reply %u.%03u secs ago",
async_reply_msecs/1000, async_reply_msecs%1000);
}
if (str_array_length(extra_args) >= 4 &&
if (extra_args != NULL &&
str_array_length(extra_args) >= 4 &&
str_to_time(extra_args[0], &tv_start.tv_sec) == 0 &&
str_to_uint(extra_args[1], &tv_start_usec) == 0 &&
str_to_time(extra_args[2], &tv_end.tv_sec) == 0 &&
Expand Down

0 comments on commit cacaa94

Please sign in to comment.