This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix idiocy in previous patch


In my previous commit, I see to have totally forgotten how C switch
statements work.

(I got good GDB test results without this patch because I had the GDB
part of the patch in my tree as well.  Bad testing methodology!  I am
rerunning the GDB testsuite now, without the complementary patch.)

Thanks to Jason Molenda for pointing this out to me!

Committed as obvious; apologies for problems.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2005-06-07  Mark Mitchell  <mark@codesourcery.com>

	* opncls.c (bfd_fdopenr): Add missing break statements.

Index: opncls.c
===================================================================
RCS file: /cvs/src/src/bfd/opncls.c,v
retrieving revision 1.34
diff -c -5 -p -r1.34 opncls.c
*** opncls.c	7 Jun 2005 22:53:32 -0000	1.34
--- opncls.c	7 Jun 2005 23:58:49 -0000
*************** bfd_fdopenr (const char *filename, const
*** 278,290 ****
      return NULL;
  
    /* (O_ACCMODE) parens are to avoid Ultrix header file bug.  */
    switch (fdflags & (O_ACCMODE))
      {
!     case O_RDONLY: mode = FOPEN_RB;
!     case O_WRONLY: mode = FOPEN_RUB;
!     case O_RDWR:   mode = FOPEN_RUB;
      default: abort ();
      }
  #endif
  
    return bfd_fopen (filename, target, mode, fd);
--- 278,290 ----
      return NULL;
  
    /* (O_ACCMODE) parens are to avoid Ultrix header file bug.  */
    switch (fdflags & (O_ACCMODE))
      {
!     case O_RDONLY: mode = FOPEN_RB; break;
!     case O_WRONLY: mode = FOPEN_RUB; break;
!     case O_RDWR:   mode = FOPEN_RUB; break;
      default: abort ();
      }
  #endif
  
    return bfd_fopen (filename, target, mode, fd);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]