diff options
Diffstat (limited to 'extension/filefuncs.c')
-rw-r--r-- | extension/filefuncs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extension/filefuncs.c b/extension/filefuncs.c index 12f3acb6..433a0ea9 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -30,6 +30,7 @@ */ #include <stdio.h> +#include <assert.h> #include <errno.h> #include <stdlib.h> #include <string.h> @@ -54,6 +55,8 @@ do_chdir(int nargs, awk_value_t *result) awk_value_t newdir; int ret = -1; + assert(result != NULL); + if (do_lint && nargs != 1) lintwarn(ext_id, "chdir: called with incorrect number of arguments, expecting 1"); @@ -264,6 +267,8 @@ do_stat(int nargs, awk_value_t *result) #endif /* S_IFDOOR */ }; + assert(result != NULL); + if (do_lint && nargs != 2) { lintwarn(ext_id, "stat: called with wrong number of arguments"); return make_number(-1, result); |