aboutsummaryrefslogtreecommitdiffstats
path: root/extension/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/time.c')
-rw-r--r--extension/time.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/extension/time.c b/extension/time.c
index ba8578c3..2024510c 100644
--- a/extension/time.c
+++ b/extension/time.c
@@ -26,6 +26,7 @@
*/
#include <stdio.h>
+#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
@@ -61,7 +62,9 @@ do_gettimeofday(int nargs, awk_value_t *result)
{
double curtime;
- if (do_lint && nargs > 0)
+ assert(result != NULL);
+
+ if (do_lint && nargs > 0)
lintwarn(ext_id, "gettimeofday: ignoring arguments");
#if defined(HAVE_GETTIMEOFDAY)
@@ -111,7 +114,9 @@ do_sleep(int nargs, awk_value_t *result)
double secs;
int rc;
- if (do_lint && nargs > 1)
+ assert(result != NULL);
+
+ if (do_lint && nargs > 1)
lintwarn(ext_id, "sleep: called with too many arguments");
if (! get_argument(0, AWK_NUMBER, &num)) {