2007-07-23 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 25 Jul 2007 02:12:33 +0000 (02:12 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 25 Jul 2007 02:12:33 +0000 (02:12 +0000)
* solib-svr4.c (svr4_fetch_objfile_link_map): Null pointer check of
'buffer' must cover both branches that call strcmp (Coverity).

gdb/ChangeLog
gdb/solib-svr4.c

index b4573836a474d482a70a90e33158023473b91ad4..27c3b36c3e5d5b9f45de7be8ea9fc81771725561 100644 (file)
@@ -1,8 +1,9 @@
-2007-07-05  Michael Snyder  <msnyder@access-company.com>
+2007-07-24  Michael Snyder  <msnyder@access-company.com>
 
-       * stack.c (print_frame_args): Check return value of lookup_symbol.
+       * solib-svr4.c (svr4_fetch_objfile_link_map): Null pointer check of
+       'buffer' must cover both branches that call strcmp (Coverity).
 
-2007-07-24  Michael Snyder  <msnyder@access-company.com>
+       * stack.c (print_frame_args): Check return value of lookup_symbol.
 
        * ax-gdb.c (find_field): Guard against null ptr.
 
index 1ef2d1e06cb2970bcb77e6803b3b7b56aa65ea5f..fc608de79f4193e09a0efb41141f0e540cf323f2 100644 (file)
@@ -839,8 +839,11 @@ svr4_fetch_objfile_link_map (struct objfile *objfile)
          /* Is this the linkmap for the file we want?  */
          /* If the file is not a shared library and has no name,
             we are sure it is the main executable, so we return that.  */
-         if ((buffer && strcmp (buffer, objfile->name) == 0)
-              || (!(objfile->flags & OBJF_SHARED) && (strcmp (buffer, "") == 0)))
+
+         if (buffer 
+             && ((strcmp (buffer, objfile->name) == 0)
+                 || (!(objfile->flags & OBJF_SHARED) 
+                     && (strcmp (buffer, "") == 0))))
            {
              do_cleanups (old_chain);
              return lm;
This page took 0.02839 seconds and 4 git commands to generate.