summaryrefslogtreecommitdiff
path: root/x11/wmessage/files/patch-panel.c
blob: b903693ca5adf0bbaa56305e14cf4b14a56d7cbe (plain) (blame)
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
--- panel.c.orig	Sun Dec 16 19:11:01 2001
+++ panel.c	Mon Dec 17 20:28:33 2001
@@ -221,7 +221,7 @@
 	char *data;
 
 	strcpy (tmpname, "/tmp/wmessage.XXXXXX");	/* last 6 chars must be X */
-	mktemp (tmpname);
+	mkstemp (tmpname);
 
 	if (!tmpname)
 		return NULL;	/* couldn't generate unique name */
@@ -344,12 +344,12 @@
 			int i, j=0, lines=0, longest=0;
 
 			msg = readFile (panel, settings);
-			if (msg == NULL)
+			if (msg == NULL) {
 				if ((settings->reload > 0) && (settings->force == True))
 					msg = wstrdup ("Cannot open file -- will keep trying.\n");
 				else
 					return NULL;
-
+			}
 			for (i = 0; i < strlen (msg); i++) /* count lines */
 				if ((*(msg+i)) == '\n') {
 					lines++;