summaryrefslogtreecommitdiff
path: root/source/a/gpm/gpm-1.20.1-gpmopen.patch
blob: f36ad93964e81aff323a79fce7d1960a5bd269d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- gpm-1.20.1/src/lib/liblow.c.gpmopen	2004-05-04 17:36:09.000000000 -0400
+++ gpm-1.20.1/src/lib/liblow.c	2004-05-04 17:42:51.000000000 -0400
@@ -200,8 +200,6 @@
    Gpm_Stst *new = NULL;
    char* sock_name = 0;
 
-   consolename = NULL;
-
 #if 0
    gpm_report(GPM_PR_DEBUG,"VC: %d",flag);
 #endif
@@ -260,6 +258,10 @@
             gpm_report(GPM_PR_ERR,"checking tty name failed");
             goto err;
          }   
+         if (consolename == NULL) {
+            gpm_report(GPM_PR_ERR,"consolename not set");
+            goto err;
+         }   
          /* do we really need this check ? */
          if(strncmp(tty,consolename,strlen(consolename)-1)
             || !isdigit(tty[strlen(consolename)-1])) {