Package: softflowd / 0.9.9-5

cherry-pick.softflowd-0.9.9-11-g3aa2af5.fix-format-type-for-pid-u-for-unsigned-instead-of-d-for-signed.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Subject: Fix format type for pid (%u for unsigned instead of %d for signed)
Origin: softflowd-0.9.9-11-g3aa2af5 <https://github.com/irino/softflowd/commit/softflowd-0.9.9-11-g3aa2af5>
Upstream-Author: SysError956 <paulgodard@gmail.com>
Date: Tue Apr 25 18:26:07 2017 -0400

--- a/softflowd.c
+++ b/softflowd.c
@@ -1953,13 +1953,13 @@
 
 		if ((pidfile = fopen(pidfile_path, "r")) != NULL) {
 			int pid;
-			fscanf(pidfile,"%d", &pid);
+			fscanf(pidfile,"%u", &pid);
 			fclose(pidfile);
 			
 			/* Check if the pid exists */
 			int pidfree = (kill(pid, 0) && errno == ESRCH);
 			if (!pidfree) {
-				fprintf(stderr, "Already running under pid %d\n",
+				fprintf(stderr, "Already running under pid %u\n",
 					pid);
 				exit(1);
 			}