texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[7660] window_change_window_height


From: gavinsmith0123
Subject: [7660] window_change_window_height
Date: Thu, 2 Feb 2017 17:25:36 -0500 (EST)

Revision: 7660
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7660
Author:   gavin
Date:     2017-02-02 17:25:36 -0500 (Thu, 02 Feb 2017)
Log Message:
-----------
window_change_window_height

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/window.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2017-02-02 21:01:07 UTC (rev 7659)
+++ trunk/ChangeLog     2017-02-02 22:25:36 UTC (rev 7660)
@@ -1,5 +1,12 @@
 2017-02-02  Gavin Smith  <address@hidden>
 
+       * info/window.c (window_change_window_height): Simplify some 
+       conditions to avoid appearing to possibly dereference a pointer
+       after it has been checked for being null.
+       (Report from Hans-Bernhard Br\xF6ker.)
+
+2017-02-02  Gavin Smith  <address@hidden>
+
        * info/search.c (skip_line): Remove unused function (which had a
        useless null pointer check in it.) (Report from Hans-Bernhard 
Br\xF6ker.)
 

Modified: trunk/info/window.c
===================================================================
--- trunk/info/window.c 2017-02-02 21:01:07 UTC (rev 7659)
+++ trunk/info/window.c 2017-02-02 22:25:36 UTC (rev 7660)
@@ -2,7 +2,7 @@
    $Id$
 
    Copyright 1993, 1997, 1998, 2001, 2002, 2003, 2004, 2007, 2008,
-   2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
+   2011, 2012, 2013, 2014, 2015, 2016, 2017 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -415,9 +415,9 @@
 
       /* If there aren't two neighboring windows, or if one of the neighbors
          is larger than the other one by at least AMOUNT, grow that one. */
-      if ((next && !prev) || ((next_avail - amount) >= prev_avail))
+      if (next_avail - amount >= prev_avail)
         grow_me_shrinking_next (window, next, amount);
-      else if ((prev && !next) || ((prev_avail - amount) >= next_avail))
+      else if (prev_avail - amount >= next_avail)
         grow_me_shrinking_prev (window, prev, amount);
       else
         {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]