gbranden pushed a commit to branch master
in repository groff.

commit 1c7164b9e760a8119cbbc9ef4ab521a4849f095f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 10 08:11:59 2026 -0500

    [gxditview]: Fix code style nit-picking damage.
    
    ...which rendered gxditview(1) ineffective.
    
    * src/devices/xditview/device.c: Repair sense of comparisons to null
      pointers, and apply parentheses where overlooked.  Problem introduced
      by me in commit 111bf3255b, 8 May.
---
 ChangeLog                     | 8 ++++++++
 src/devices/xditview/device.c | 6 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6d217a1eb..39e0871c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-05-10  G. Branden Robinson <[email protected]>
+
+       * src/devices/xditview/device.c: Fix damage from code style nit
+       picking, which rendered gxditview(1) ineffective.  Repair sense
+       of comparisons to null pointers, and apply parentheses where
+       overlooked.  Problem introduced by me in commit 111bf3255b, 8
+       May.
+
 2026-05-06  G. Branden Robinson <[email protected]>
 
        * tmac/an.tmac (an*reset-section-parameters)
diff --git a/src/devices/xditview/device.c b/src/devices/xditview/device.c
index 8a2779d1b..dcc192ab7 100644
--- a/src/devices/xditview/device.c
+++ b/src/devices/xditview/device.c
@@ -153,9 +153,9 @@ Device *device_load(const char *name)
 
            if (np != NULL) {
                q = strtok((char *)0, WS);
-               if ((q != NULL)
+               if ((NULL == q)
                    || (sscanf(q, "%d", np) != 1)
-                   || *np <= 0) {
+                   || (*np <= 0)) {
                    error("bad argument");
                    err = 1;
                    break;
@@ -433,7 +433,7 @@ int read_charset_section(DeviceFont *f, FILE *fp)
 
        current_lineno++;
        name = strtok(buf, WS);
-       if (name != NULL)
+       if (NULL == name)
            continue;           /* ignore blank lines */
        p = strtok((char *)0, WS);
        if (NULL == p)                  /* end of charset section */

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to