Skip to content

Commit

Permalink
zdb.c: move strlen() before the for loop
Browse files Browse the repository at this point in the history
Signed-off-by: rilysh <[email protected]>
  • Loading branch information
rilysh committed Oct 1, 2024
1 parent aa9e3da commit 4b1c896
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/zdb/zdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -8816,7 +8816,8 @@ zdb_read_block(char *thing, spa_t *spa)
for (s = strtok_r(flagstr, ":", &tmp);
s != NULL;
s = strtok_r(NULL, ":", &tmp)) {
for (i = 0, len = strlen(flagstr); i < len; i++) {
len = strlen(flagstr);
for (i = 0; i < len; i++) {
int bit = flagbits[(uchar_t)flagstr[i]];

if (bit == 0) {
Expand Down

0 comments on commit 4b1c896

Please sign in to comment.