Skip to content

Commit c2e720c

Browse files
committed
Rewrite conditional, remove always-true clause
Parameter is unsigned, no need to check that it's >= 0. Closes #132
1 parent 0a26ee1 commit c2e720c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypaint-brush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1437,7 +1437,7 @@ update_brush_setting_from_json_object(MyPaintBrush *self,
14371437
{
14381438
MyPaintBrushSetting setting_id = mypaint_brush_setting_from_cname(setting_name);
14391439

1440-
if (!(setting_id >= 0 && setting_id < MYPAINT_BRUSH_SETTINGS_COUNT)) {
1440+
if (setting_id >= MYPAINT_BRUSH_SETTINGS_COUNT) {
14411441
fprintf(stderr, "Warning: Unknown setting_id: %d for setting: %s\n",
14421442
setting_id, setting_name);
14431443
return FALSE;

0 commit comments

Comments
 (0)