projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Remove dropin random() function, as it is not used anymore.
[tinc]
/
lib
/
pidfile.c
diff --git
a/lib/pidfile.c
b/lib/pidfile.c
index
830d3f3
..
dd6788a
100644
(file)
--- a/
lib/pidfile.c
+++ b/
lib/pidfile.c
@@
-41,7
+41,8
@@
pid_t read_pid (char *pidfile)
if (!(f=fopen(pidfile,"r")))
return 0;
- fscanf(f,"%ld", &pid);
+ if(fscanf(f,"%ld", &pid) != 1)
+ pid = 0;
fclose(f);
return pid;
}