diff options
Diffstat (limited to 'src/libstddjb/open_readb.c')
-rw-r--r-- | src/libstddjb/open_readb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstddjb/open_readb.c b/src/libstddjb/open_readb.c index a8b0518..6fcede1 100644 --- a/src/libstddjb/open_readb.c +++ b/src/libstddjb/open_readb.c @@ -4,9 +4,9 @@ int open_readb (char const *fn) { - register int fd = open_read(fn) ; - if (fd == -1) return -1 ; - if (ndelay_off(fd) == -1) + int fd = open_read(fn) ; + if (fd < 0) return -1 ; + if (ndelay_off(fd) < 0) { fd_close(fd) ; return -1 ; |