patch-1.3.37 linux/fs/umsdos/dir.c

Next file: linux/include/asm-alpha/a.out.h
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.36/linux/fs/umsdos/dir.c linux/fs/umsdos/dir.c
@@ -260,7 +260,7 @@
 /*
 	Read count directory entries from directory filp
 	Return a negative value from linux/errno.h.
-	Return > 0 if success (the amount of byte written to dirent)
+	Return 0 or positive if successful
 */
 static int UMSDOS_readdir(
 	struct inode *dir,		/* Point to a description of the super block */
@@ -284,7 +284,7 @@
 	}
 	PRINTK (("UMSDOS_readdir out %d count %d pos %Ld\n",ret,count
 		,filp->f_pos));
-	return count == 0 ? -ENOENT : ret;
+	return count?:ret;
 }
 /*
 	Complete the inode content with info from the EMD file

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this