From patchwork Thu May 21 19:31:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 6853 Received: (qmail 85449 invoked by alias); 21 May 2015 19:31:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 85435 invoked by uid 89); 21 May 2015 19:31:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-wi0-f170.google.com Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 21 May 2015 19:31:30 +0000 Received: by wicmx19 with SMTP id mx19so25773787wic.0 for ; Thu, 21 May 2015 12:31:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=d6o5ZKZ8YdH9rbVfo6qTM7CACmztKc3kHi477rMsu78=; b=OOFRN/3ADgE8LJxkWRqKpAsAEuP25l3MgIp706K1yAqNOeM1TWMAzs8sIqMUEVmkGB 2bupaLe+LpgXNoIpbbK239xGMlWoevl60Iuq2sYriKbGe/E5Fs/HhqfgP5oxfofU1+kG K4cZEAvS+RooTs+aEfTkT9PCL5+HGlygIwGnGMlT26LFReJVki3mG9NPFXZf0bsWJce9 uoF6YnQ0OFVJVZ7hS6EsNlhaz7mJIISCXPbqLUYy3yztMJla74O3wd2JMLrMSApI/cn9 zmTndG4SrdUpnMRTHwSDrwQ5uhdiVMbsFuy3d7L5OcxeEGWP7FnYtoJVqqoWI0AJwpgA iFPQ== X-Gm-Message-State: ALoCoQkeetKC4+aeusoOZtSmPKckfykELCMerlasTFU8cv2g6FRV6569OtHxqAUYtMT4lQIx2lWZ X-Received: by 10.181.13.232 with SMTP id fb8mr525320wid.78.1432236686934; Thu, 21 May 2015 12:31:26 -0700 (PDT) Received: from localhost ([46.189.28.200]) by mx.google.com with ESMTPSA id ex2sm33547023wjd.28.2015.05.21.12.31.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 May 2015 12:31:26 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [OBV][PATCH] gdb: Use NULL not 0 in a tui function. Date: Thu, 21 May 2015 21:31:14 +0200 Message-Id: X-IsSubscribed: yes Pushed as obvious clean up. Thanks, Andrew --- gdb/ChangeLog: * tui/tui-regs.c (tui_reg_next_command): Use NULL not 0. --- gdb/ChangeLog | 4 ++++ gdb/tui/tui-regs.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f9b91d5..42ef67d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2015-05-21 Andrew Burgess + * tui/tui-regs.c (tui_reg_next_command): Use NULL not 0. + +2015-05-21 Andrew Burgess + * tui/tui-layout.c (tui_set_layout_for_display_command): Ensure buf_ptr is freed. diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 903c7c6..8d4c0f8 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -561,14 +561,14 @@ tui_reg_next_command (char *arg, int from_tty) { struct gdbarch *gdbarch = get_current_arch (); - if (TUI_DATA_WIN != 0) + if (TUI_DATA_WIN != NULL) { struct reggroup *group = TUI_DATA_WIN->detail.data_display_info.current_group; group = reggroup_next (gdbarch, group); - if (group == 0) - group = reggroup_next (gdbarch, 0); + if (group == NULL) + group = reggroup_next (gdbarch, NULL); if (group) tui_show_registers (group);