Skip to content

Commit

Permalink
fix(error-utils): wrong check with strcmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonidotpy committed Oct 5, 2023
1 parent f9f5237 commit 78983a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion error-utils/error_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static inline bool _error_utils_compare(ErrorUtilsHandler * handler, ErrorUtilsR
static inline bool _error_utils_is_equal(ErrorUtilsRunningInstance * err, uint32_t error, ErrorUtilsInstance instance, bool is_string) {
if (err->string_instance != is_string)
return false;
bool inst_cmp = err->string_instance ? strcmp(instance.s, err->instance.s) : instance.i == err->instance.i;
bool inst_cmp = err->string_instance ? strcmp(instance.s, err->instance.s) == 0 : instance.i == err->instance.i;
return err->error == error && inst_cmp;
}
/**
Expand Down

0 comments on commit 78983a9

Please sign in to comment.