summaryrefslogtreecommitdiff
path: root/app-misc/actkbd/files/actkbd-0.2.7-amd64.patch
blob: 574e341b5c79c162c8cd1055060ed170546d62d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Try to fix pointer assigned to int and vice-versa problems.  Written by Joe Pelkey.

--- a/actkbd.h
+++ b/actkbd.h
@@ -122,7 +122,7 @@
 typedef struct _attr_t attr_t;
 struct _attr_t {
     int type;			/* Attribute type */
-    void *opt;			/* Options for this attribute */
+    int opt;			/* Options for this attribute */
     attr_t *next;		/* The next node */
 };
 
--- a/config.c
+++ b/config.c
@@ -107,7 +107,7 @@
     strtolower(attrs);
     while ((tmp = strsep(&attrs, ", \t")) != NULL) {
 	int type = -1;
-	void *opt = NULL;
+	int opt = 0;
 	char *num = NULL;
 
 	if (strlen(tmp) == 0)
@@ -174,9 +174,9 @@
 
 	    errno = 0;
 	    if (strlen(num) > 0) {
-		opt = (void *)((int)strtol(num, (char **)NULL, 10));
+		opt = ((int)strtol(num, (char **)NULL, 10));
 	    } else {
-		opt = (void *)((int)(-1));
+		opt = ((int)(-1));
 	    }
 
 	    if (((int)opt < 0) &&