Changeset 1763 for zzuf/trunk


Ignore:
Timestamp:
Mar 2, 2007, 12:53:51 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Save errno in offset_check, thanks to Sami Liedes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/lib-fd.c

    r1728 r1763  
    3535#include <string.h>
    3636#include <stdio.h>
     37#include <errno.h>
    3738
    3839#if defined HAVE_WINSOCK2_H
     
    490491#endif
    491492
     493/* Sanity check, can be OK though (for instance with a character device) */
    492494static void offset_check(int fd)
    493495{
    494     /* Sanity check, can be OK though (for instance with a character device) */
     496    int orig_errno = errno;
    495497#if defined HAVE_LSEEK64
    496498    off64_t ret;
     
    504506    if(ret != -1 && ret != _zz_getpos(fd))
    505507        debug("warning: offset inconsistency");
    506 }
    507 
     508    errno = orig_errno;
     509}
     510
Note: See TracChangeset for help on using the changeset viewer.