apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Fogel <kfo...@newton.ch.collab.net>
Subject [PATCH] file_io/unix/filestat.c
Date Thu, 12 Dec 2002 17:36:58 GMT
I think this patch is correct, but can someone more familiar with this
area (Bill Rowe?) please review?  Thanks.

2002-12-12    <kfogel@collab.net>

	* file_io/unix/filestat.c: Check the `mode' variable to
	determine the return type (follow up to revision 1.58).

Index: file_io/unix/filestat.c
===================================================================
RCS file: /home/cvspublic/apr/file_io/unix/filestat.c,v
retrieving revision 1.59
diff -u -r1.59 filestat.c
--- file_io/unix/filestat.c	12 Dec 2002 15:41:16 -0000	1.59
+++ file_io/unix/filestat.c	12 Dec 2002 18:13:05 -0000
@@ -62,7 +62,7 @@
 {
     apr_filetype_e type;
 
-    switch (type & S_IFMT) {
+    switch (mode & S_IFMT) {
     case S_IFREG:
         type = APR_REG;  break;
     case S_IFDIR:
@@ -87,12 +87,12 @@
          * for Linux et al.
          */
 #if !defined(S_IFFIFO) && defined(S_ISFIFO)
-    	if (S_ISFIFO(type)) {
+    	if (S_ISFIFO(mode)) {
             type = APR_PIPE;
 	} else
 #endif
 #if !defined(BEOS) && !defined(S_IFSOCK) && defined(S_ISSOCK)
-    	if (S_ISSOCK(type)) {
+    	if (S_ISSOCK(mode)) {
             type = APR_SOCK;
 	} else
 #endif

Mime
View raw message