projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WSAEVENT is a pointer, so we cannot simply return the different of two
[tinc]
/
src
/
dropin.c
diff --git
a/src/dropin.c
b/src/dropin.c
index
fe3b7ef
..
74e5676
100644
(file)
--- a/
src/dropin.c
+++ b/
src/dropin.c
@@
-50,8
+50,9
@@
int daemon(int nochdir, int noclose) {
}
/* If we are the parent, terminate */
}
/* If we are the parent, terminate */
- if(pid)
+ if(pid)
{
exit(0);
exit(0);
+ }
/* Detach by becoming the new process group leader */
if(setsid() < 0) {
/* Detach by becoming the new process group leader */
if(setsid() < 0) {
@@
-108,11
+109,12
@@
int vasprintf(char **buf, const char *fmt, va_list ap) {
status = vsnprintf(*buf, len, fmt, aq);
va_end(aq);
status = vsnprintf(*buf, len, fmt, aq);
va_end(aq);
- if(status >= 0)
+ if(status >= 0)
{
*buf = xrealloc(*buf, status + 1);
*buf = xrealloc(*buf, status + 1);
+ }
if(status > len - 1) {
if(status > len - 1) {
- len = status;
+ len = status
+ 1
;
va_copy(aq, ap);
status = vsnprintf(*buf, len, fmt, aq);
va_end(aq);
va_copy(aq, ap);
status = vsnprintf(*buf, len, fmt, aq);
va_end(aq);