From 820b6a2ccb7859e15ade36af6ac1d0d08c1da4b1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 12 Jun 2012 22:10:31 +0300 Subject: Further cleanups and improvements in API. --- extension/time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'extension/time.c') diff --git a/extension/time.c b/extension/time.c index 4f590c88..09e71d0e 100644 --- a/extension/time.c +++ b/extension/time.c @@ -116,8 +116,7 @@ do_sleep(int nargs, awk_value_t *result) if (do_lint && nargs > 1) lintwarn(ext_id, "sleep: called with too many arguments"); - - if (get_curfunc_param(0, AWK_NUMBER, &num) == NULL) { + if (get_argument(0, AWK_NUMBER, &num) == NULL) { update_ERRNO_string("sleep: missing required numeric argument", 1); return make_number(-1, result); } @@ -151,7 +150,7 @@ do_sleep(int nargs, awk_value_t *result) #else /* no way to sleep on this platform */ rc = -1; - set_ERRNO("sleep: not supported on this platform"); + update_ERRNO_str("sleep: not supported on this platform", 0); #endif return make_number(rc, result); -- cgit v1.2.3