summaryrefslogtreecommitdiff
path: root/security/gnupg-devel/patches/patch-ab
blob: bad14ee4cc124662919b5a8433e05d9eaa707655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ab,v 1.1 2004/11/23 11:10:35 shannonjr Exp $

--- jnlib/logging.c.orig	2004-10-21 13:00:25.000000000 -0600
+++ jnlib/logging.c
@@ -411,9 +411,12 @@ log_get_prefix (unsigned int *flags)
 int
 log_test_fd (int fd)
 {
-  int tmp = fileno (logstream);
-  if ( tmp != -1 && tmp == fd)
-    return 1;
+  if (logstream != NULL)
+  {
+    int tmp = fileno (logstream);
+    if ( tmp != -1 && tmp == fd)
+      return 1;
+  }
   if (log_socket != -1 && log_socket == fd)
     return 1;
   return 0;