about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-06-09 06:59:02 -0700
committerPetr Baudis <pasky@suse.cz>2009-06-09 17:57:33 +0200
commite40d82c4ee736936290827c8297c2c58e2181932 (patch)
treed0273d6434e18f1c30fd15e75f39579ae5d56b1f
parente926cb177490407dfea3fc6c181a272b7b8a2a20 (diff)
downloadglibc-e40d82c4ee736936290827c8297c2c58e2181932.tar.gz
glibc-e40d82c4ee736936290827c8297c2c58e2181932.tar.xz
glibc-e40d82c4ee736936290827c8297c2c58e2181932.zip
(_IO_new_file_fopen): Don't prematurely stop parsing mode string.
(cherry picked from commits 0d74e0436195a051d69e78bef10d23879788cb7e,
d360a0da2b42b2b79e9ce9c2d7984c234e840b7a)
-rw-r--r--ChangeLog5
-rw-r--r--libio/fileops.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1211e1df5e..3063dc8b87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-09  Ulrich Drepper  <drepper@redhat.com>
+
+       * libio/fileops.c (_IO_new_file_fopen): Don't prematurely stop
+       parsing mode string.
+
 2009-06-03  Ulrich Drepper  <drepper@redhat.com>
 
 	* elf/dl-sysdep.c (_dl_show_auxv): Terminate correct string.
diff --git a/libio/fileops.c b/libio/fileops.c
index cf47c915a7..4698953f7a 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008
+/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
@@ -319,11 +319,11 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
 	  continue;
 	case 'c':
 	  fp->_flags2 |= _IO_FLAGS2_NOTCANCEL;
-	  break;
+	  continue;
 #ifdef O_CLOEXEC
 	case 'e':
 	  oflags |= O_CLOEXEC;
-	  break;
+	  continue;
 #endif
 	default:
 	  /* Ignore.  */