diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-11-15 04:24:42 -0500 |
commit | 312be3f9f5eab1643d7dcc7728c76d413d4f2640 (patch) | |
tree | 445eab9ef93914585b6625aa6ca93c24715771b7 /misc/mntent_r.c | |
parent | 82af0fa8de8201803ac670fa0de7d702ce9f0f18 (diff) | |
download | glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.gz glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.tar.xz glibc-312be3f9f5eab1643d7dcc7728c76d413d4f2640.zip |
Clean up internal fopen uses
No need to ever not use c and e.
Diffstat (limited to 'misc/mntent_r.c')
-rw-r--r-- | misc/mntent_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 0e9835c61e..3b5418a193 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -38,10 +38,10 @@ FILE * __setmntent (const char *file, const char *mode) { /* Extend the mode parameter with "c" to disable cancellation in the - I/O functions. */ + I/O functions and "e" to set FD_CLOEXEC. */ size_t modelen = strlen (mode); - char newmode[modelen + 2]; - memcpy (mempcpy (newmode, mode, modelen), "c", 2); + char newmode[modelen + 3]; + memcpy (mempcpy (newmode, mode, modelen), "ce", 3); FILE *result = fopen (file, newmode); if (result != NULL) |