Skip to content

Commit

Permalink
apc_modbus: Add an early exit if a USB regex is non-zero
Browse files Browse the repository at this point in the history
A minuscule optimization.

Signed-off-by: Axel Gembe <axel@gembe.net>
  • Loading branch information
EchterAgo committed Oct 21, 2023
1 parent e5a15d1 commit 0f675b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/apc_modbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,7 @@ void upsdrv_initups(void)
for (i = 0; i < sizeof(regex_array) / sizeof(regex_array[0]); i++) {
if (regex_array[i] != NULL) {
has_nonzero_regex = 1;
break;
}
}

Expand Down

0 comments on commit 0f675b4

Please sign in to comment.