Skip to content

Commit

Permalink
Rewrite conditional, remove always-true clause
Browse files Browse the repository at this point in the history
Parameter is unsigned, no need to check that it's >= 0.

Closes #132
  • Loading branch information
jplloyd committed Dec 27, 2019
1 parent 0a26ee1 commit c2e720c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypaint-brush.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ update_brush_setting_from_json_object(MyPaintBrush *self,
{
MyPaintBrushSetting setting_id = mypaint_brush_setting_from_cname(setting_name);

if (!(setting_id >= 0 && setting_id < MYPAINT_BRUSH_SETTINGS_COUNT)) {
if (setting_id >= MYPAINT_BRUSH_SETTINGS_COUNT) {
fprintf(stderr, "Warning: Unknown setting_id: %d for setting: %s\n",
setting_id, setting_name);
return FALSE;
Expand Down

0 comments on commit c2e720c

Please sign in to comment.