summaryrefslogtreecommitdiff
path: root/lib/fchdir.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:17:09 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:17:09 +0300
commitcc78bdc31749e9754120ae5a9d4849f4832b40a4 (patch)
tree4f9e3f2064e56651ed8d41ae9d8ce8b08fc5241b /lib/fchdir.c
parent8425beb209e6fedf50bcdd934ced14dfa0d7b596 (diff)
parent71cd8e3a743046573744123777061b64881bf372 (diff)
downloadcoreutils-cc78bdc31749e9754120ae5a9d4849f4832b40a4.tar.gz
Merge tag 'upstream/8.24'
Upstream version 8.24 Conflicts: INSTALL Makefile.in aclocal.m4 build-aux/config.guess build-aux/config.rpath build-aux/config.sub build-aux/depcomp build-aux/missing build-aux/test-driver build-aux/texinfo.tex doc/coreutils.info doc/stamp-vti doc/version.texi gnulib-tests/Makefile.in po/Makefile.in.in
Diffstat (limited to 'lib/fchdir.c')
-rw-r--r--lib/fchdir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/fchdir.c b/lib/fchdir.c
index 5d713773..944d1bdf 100644
--- a/lib/fchdir.c
+++ b/lib/fchdir.c
@@ -1,5 +1,5 @@
/* fchdir replacement.
- Copyright (C) 2006-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 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
@@ -19,7 +19,6 @@
/* Specification. */
#include <unistd.h>
-#include <assert.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
@@ -29,6 +28,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#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. */