diff options
author | john haque <j.eh@mchsi.com> | 2011-08-20 08:28:02 -0500 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2011-10-12 07:33:05 -0500 |
commit | 1fea520248b42ca995c8797698c60301ea42ffe9 (patch) | |
tree | 1aa80c13392c25aa6bf3eb931fec9c83a0621e25 /extension/fork.c | |
parent | f757e147f1ae8254669b3222bc24a39ee8ff9b8f (diff) | |
download | egawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.gz egawk-1fea520248b42ca995c8797698c60301ea42ffe9.tar.bz2 egawk-1fea520248b42ca995c8797698c60301ea42ffe9.zip |
Speed/memory performance improvements.
Diffstat (limited to 'extension/fork.c')
-rw-r--r-- | extension/fork.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extension/fork.c b/extension/fork.c index aff9b568..88353879 100644 --- a/extension/fork.c +++ b/extension/fork.c @@ -38,7 +38,7 @@ do_fork(int nargs) NODE **aptr; NODE *tmp; - if (do_lint && get_curfunc_arg_count() > 0) + if (do_lint && nargs > 0) lintwarn("fork: called with too many arguments"); ret = fork(); @@ -48,11 +48,11 @@ do_fork(int nargs) else if (ret == 0) { /* update PROCINFO in the child */ - aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3), FALSE); + aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3)); (*aptr)->numbr = (AWKNUM) getpid(); unref(tmp); - aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4), FALSE); + aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 4)); (*aptr)->numbr = (AWKNUM) getppid(); unref(tmp); } @@ -73,7 +73,7 @@ do_waitpid(int nargs) pid_t pid; int options = 0; - if (do_lint && get_curfunc_arg_count() > 1) + if (do_lint && nargs > 1) lintwarn("waitpid: called with too many arguments"); pidnode = get_scalar_argument(0, FALSE); |