comparison src/dumper.c @ 5838:b1500f1ec617

Check return value of lseek.
author Marcus Crestani <marcus@crestani.de>
date Sat, 13 Dec 2014 14:02:55 +0100
parents 09b5be18ba0e
children d139eb1fead8
comparison
equal deleted inserted replaced
5837:09b5be18ba0e 5838:b1500f1ec617
2551 { 2551 {
2552 retry_close (fd); 2552 retry_close (fd);
2553 return 0; 2553 return 0;
2554 } 2554 }
2555 2555
2556 lseek (fd, 0, SEEK_SET); 2556 if (lseek (fd, 0, SEEK_SET) == -1)
2557 {
2558 retry_close (fd);
2559 return 0;
2560 }
2557 2561
2558 #ifdef HAVE_MMAP 2562 #ifdef HAVE_MMAP
2559 /* Unix 98 requires that sys/mman.h define MAP_FAILED, 2563 /* Unix 98 requires that sys/mman.h define MAP_FAILED,
2560 but many earlier implementations don't. */ 2564 but many earlier implementations don't. */
2561 # ifndef MAP_FAILED 2565 # ifndef MAP_FAILED