svn commit: trunk/uClibc/libc/misc/mntent
kraj at uclibc.org
kraj at uclibc.org
Sat Nov 10 06:42:46 UTC 2007
Author: kraj
Date: 2007-11-09 22:42:45 -0800 (Fri, 09 Nov 2007)
New Revision: 20406
Log:
Do not return error when fprintf returns 0 in addmntent().
fprintf is considered failing if the return is less than 0
Modified:
trunk/uClibc/libc/misc/mntent/mntent.c
Changeset:
Modified: trunk/uClibc/libc/misc/mntent/mntent.c
===================================================================
--- trunk/uClibc/libc/misc/mntent/mntent.c 2007-11-10 03:24:21 UTC (rev 20405)
+++ trunk/uClibc/libc/misc/mntent/mntent.c 2007-11-10 06:42:45 UTC (rev 20406)
@@ -98,11 +98,8 @@
if (fseek(filep, 0, SEEK_END) < 0)
return 1;
- if (fprintf (filep, "%s %s %s %s %d %d\n", mnt->mnt_fsname, mnt->mnt_dir,
- mnt->mnt_type, mnt->mnt_opts, mnt->mnt_freq, mnt->mnt_passno) < 1)
- return 1;
-
- return 0;
+ return (fprintf (filep, "%s %s %s %s %d %d\n", mnt->mnt_fsname, mnt->mnt_dir,
+ mnt->mnt_type, mnt->mnt_opts, mnt->mnt_freq, mnt->mnt_passno) < 0 ? 1 : 0);
}
char *hasmntopt(const struct mntent *mnt, const char *opt)
More information about the uClibc-cvs
mailing list