1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

Fix sparse warning: Using plain integer as NULL pointer

This patch fixes the "using plain integer as NULL pointer" warnings
generated by running sparse on the flashrom source.

Corresponding to flashrom svn r1255.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Mathias Krause <mathias.krause@secunet.com>
Acked-by: Stefan Reinauer <stepan@coreboot.org>
This commit is contained in:
Peter Huewe
2011-01-24 19:15:51 +00:00
committed by Stefan Reinauer
parent ff30d8a538
commit 73f8ec8b1e
7 changed files with 27 additions and 27 deletions

View File

@ -45,11 +45,11 @@ static unsigned long measure_os_delay_resolution(void)
struct timeval start, end;
unsigned long counter = 0;
gettimeofday(&start, 0);
gettimeofday(&start, NULL);
timeusec = 0;
while (!timeusec && (++counter < 1000000000)) {
gettimeofday(&end, 0);
gettimeofday(&end, NULL);
timeusec = 1000000 * (end.tv_sec - start.tv_sec) +
(end.tv_usec - start.tv_usec);
/* Protect against time going forward too much. */
@ -68,9 +68,9 @@ static unsigned long measure_delay(int usecs)
unsigned long timeusec;
struct timeval start, end;
gettimeofday(&start, 0);
gettimeofday(&start, NULL);
myusec_delay(usecs);
gettimeofday(&end, 0);
gettimeofday(&end, NULL);
timeusec = 1000000 * (end.tv_sec - start.tv_sec) +
(end.tv_usec - start.tv_usec);
/* Protect against time going forward too much. */