[git commit nptl] remove(): slight readabability tweak, no code changes

Denys Vlasenko vda.linux at googlemail.com
Fri Sep 18 14:07:31 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=ff12bad5238a65fa2ff6f02468213947211a6362
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libc/stdio/remove.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/libc/stdio/remove.c b/libc/stdio/remove.c
index c186164..af28507 100644
--- a/libc/stdio/remove.c
+++ b/libc/stdio/remove.c
@@ -10,22 +10,19 @@
 #include <unistd.h>
 #include <errno.h>
 
-/* libc_hidden_proto(rmdir) */
-/* libc_hidden_proto(unlink) */
-
 /* SUSv3 states:
  *   If path does not name a directory, remove(path) shall be equivalent
  *   to unlink(path).  If path names a directory, remove(path) shall be
  *   equivalent to rmdir(path).
  */
 
-/* libc_hidden_proto(remove) */
 int remove(register const char *filename)
 {
 	int saved_errno = errno;
 	int rv;
 
-	if (((rv = rmdir(filename)) < 0) && (errno == ENOTDIR)) {
+	rv = rmdir(filename);
+	if ((rv < 0) && (errno == ENOTDIR)) {
 		__set_errno(saved_errno); /* Need to restore errno. */
 		rv = unlink(filename);
 	}
-- 
1.6.3.3



More information about the uClibc-cvs mailing list