Amazingly picky bug fixes from Valgrind.
This commit is contained in:
parent
230d62c475
commit
15680d56a6
9 changed files with 20 additions and 9 deletions
|
|
@ -29,14 +29,18 @@ void
|
|||
threadmain(int argc, char *argv[])
|
||||
{
|
||||
char buf[512];
|
||||
int fd;
|
||||
int fd, dofork;
|
||||
|
||||
progname = "plumber";
|
||||
dofork = 1;
|
||||
|
||||
ARGBEGIN{
|
||||
case 'd':
|
||||
debug = 1;
|
||||
break;
|
||||
case 'f':
|
||||
dofork = 0;
|
||||
break;
|
||||
case 'p':
|
||||
plumbfile = ARGF();
|
||||
break;
|
||||
|
|
@ -66,6 +70,7 @@ threadmain(int argc, char *argv[])
|
|||
* Start all processes and threads from other proc
|
||||
* so we (main pid) can return to user.
|
||||
*/
|
||||
if(dofork)
|
||||
switch(fork()){
|
||||
case -1:
|
||||
sysfatal("fork: %r");
|
||||
|
|
|
|||
|
|
@ -741,6 +741,7 @@ morerules(uchar *text, int done)
|
|||
;
|
||||
while((rs=readruleset()) != nil){
|
||||
rules = erealloc(rules, (n+2)*sizeof(Ruleset*));
|
||||
fprint(2, "initialize rules %d %d\n", n, n+1);
|
||||
rules[n++] = rs;
|
||||
rules[n] = nil;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue