X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Ffchdir.c;h=6b0f97e74604d419a9255e6d50461c7c6d3dbedf;hb=a2f84200a3642c51afc3fad750ea264ac120bcd1;hp=2e07553e6b31c6ac48d4329dc24964f4db5075fa;hpb=dc84183747ce1703eb99685b5dbde1f65a143c06;p=debian%2Fgzip diff --git a/lib/fchdir.c b/lib/fchdir.c index 2e07553..6b0f97e 100644 --- a/lib/fchdir.c +++ b/lib/fchdir.c @@ -1,5 +1,5 @@ /* fchdir replacement. - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,14 +12,13 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ #include /* Specification. */ #include -#include #include #include #include @@ -29,6 +28,7 @@ #include #include +#include "assure.h" #include "dosname.h" #include "filenamecat.h" @@ -132,7 +132,7 @@ _gl_register_fd (int fd, const char *filename) { struct stat statbuf; - assert (0 <= fd); + assure (0 <= fd); if (REPLACE_OPEN_DIRECTORY || (fstat (fd, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))) { @@ -156,7 +156,7 @@ _gl_register_fd (int fd, const char *filename) int _gl_register_dup (int oldfd, int newfd) { - assert (0 <= oldfd && 0 <= newfd && oldfd != newfd); + assure (0 <= oldfd && 0 <= newfd && oldfd != newfd); if (oldfd < dirs_allocated && dirs[oldfd].name) { /* Duplicated a directory; must ensure newfd is allocated. */