From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28472 invoked by alias); 29 Jun 2007 00:37:07 -0000 Received: (qmail 28463 invoked by uid 22791); 29 Jun 2007 00:37:07 -0000 X-Spam-Check-By: sourceware.org Received: from b.mail.sonic.net (HELO b.mail.sonic.net) (64.142.19.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 29 Jun 2007 00:37:05 +0000 Received: from webmail.sonic.net (b.webmail.sonic.net [64.142.100.148]) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id l5T0b3pV018143 for ; Thu, 28 Jun 2007 17:37:03 -0700 Received: from 12.7.175.2 (SquirrelMail authenticated user msnyder) by webmail.sonic.net with HTTP; Thu, 28 Jun 2007 17:37:03 -0700 (PDT) Message-ID: <5515.12.7.175.2.1183077423.squirrel@webmail.sonic.net> Date: Fri, 29 Jun 2007 00:44:00 -0000 Subject: [OB] pointer ref, m2-typeprint.c From: msnyder@sonic.net To: gdb-patches@sourceware.org User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20070628173703_85390" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-06/txt/msg00513.txt.bz2 ------=_20070628173703_85390 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 55 Move a pointer reference to after the check for NULL. ------=_20070628173703_85390 Content-Type: text/plain; name="null.txt" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="null.txt" Content-length: 816 2007-06-28 Michael Snyder * m2-typeprint.c (m2_print_type): Move pointer ref after null test (Coverity). Index: m2-typeprint.c =================================================================== RCS file: /cvs/src/src/gdb/m2-typeprint.c,v retrieving revision 1.11 diff -p -r1.11 m2-typeprint.c *** m2-typeprint.c 9 Jan 2007 17:58:51 -0000 1.11 --- m2-typeprint.c 29 Jun 2007 00:34:37 -0000 *************** m2_print_type (struct type *type, char * *** 72,78 **** int demangled_args; CHECK_TYPEDEF (type); - code = TYPE_CODE (type); QUIT; --- 72,77 ---- *************** m2_print_type (struct type *type, char * *** 83,88 **** --- 82,88 ---- return; } + code = TYPE_CODE (type); switch (TYPE_CODE (type)) { case TYPE_CODE_SET: ------=_20070628173703_85390--