Skip to content

Commit

Permalink
disk: fix epoc.txt version parsing code
Browse files Browse the repository at this point in the history
  • Loading branch information
joemfb committed Jul 5, 2024
1 parent a04a2ed commit a63cb27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/vere/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,9 +1723,9 @@ _disk_epoc_load(u3_disk* log_u, c3_d lat_d)
return _epoc_gone;
}

if ( (1 != sscanf(ver_c, "%" SCNu32 "%n", &ver_w, &car_i))
&& (0 < car_i)
&& ('\0' == *(ver_c + car_i)) )
if ( !( (1 == sscanf(ver_c, "%" SCNu32 "%n", &ver_w, &car_i))
&& (0 < car_i)
&& ('\0' == *(ver_c + car_i)) ) )
{
fprintf(stderr, "disk: failed to parse epoch version: '%s'\r\n", ver_c);
return _epoc_fail;
Expand Down

0 comments on commit a63cb27

Please sign in to comment.