gbranden pushed a commit to branch master
in repository groff.

commit f4b16bd4a2975c455c935d1b830a202502ec1061
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Mar 15 14:28:15 2026 -0500

    [xditview]: NULL-initialize automatic pointers.
    
    * src/devices/xditview/device.c (find_file): Initialize local pointer
      variables with explicit null pointer constant.
---
 ChangeLog                     | 5 +++++
 src/devices/xditview/device.c | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3f4efc63f..526627413 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-03-15  G. Branden Robinson <[email protected]>
+
+       * src/devices/xditview/device.c (find_file): Initialize local
+       pointer variables with explicit null pointer constant.
+
 2026-03-15  G. Branden Robinson <[email protected]>
 
        Trivially refactor.  Compare C/C++ objects of `char` type to
diff --git a/src/devices/xditview/device.c b/src/devices/xditview/device.c
index 16b44e21c..dc309eb14 100644
--- a/src/devices/xditview/device.c
+++ b/src/devices/xditview/device.c
@@ -472,9 +472,9 @@ FILE *find_file(const char *file, char **result)
   char *buf = NULL;
   int bufsiz = 0;
   int flen;
-  FILE *fp;
-  char *path;
-  char *env;
+  FILE *fp = NULL;
+  char *path = NULL;
+  char *env = NULL;
 
   env = getenv(FONT_ENV_VAR);
   path = XtMalloc((((env != NULL) && (*env != '\0'))

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

Reply via email to