Skip to content

Commit

Permalink
ximgview: Fix Unchecked return value in main.c (OSGeo#5204)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamDesai authored Feb 26, 2025
1 parent 99ed5dd commit 01f63dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions visualization/ximgview/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ static void redraw(void)
{
struct timeval tv0, tv1;

gettimeofday(&tv0, NULL);
if (gettimeofday(&tv0, NULL) != 0) {
G_fatal_error(_("gettimeofday failed"));
}

draw();

gettimeofday(&tv1, NULL);
if (gettimeofday(&tv1, NULL) != 0) {
G_fatal_error(_("gettimeofday failed"));
}
last = (tv1.tv_sec - tv0.tv_sec) * 1000000L + (tv1.tv_usec - tv0.tv_usec);
}

Expand Down

0 comments on commit 01f63dc

Please sign in to comment.