diff options
author | Mark Lumsden <lum@cvs.openbsd.org> | 2019-07-20 06:00:17 +0000 |
---|---|---|
committer | Mark Lumsden <lum@cvs.openbsd.org> | 2019-07-20 06:00:17 +0000 |
commit | cf3456b3d3268548bc7b352b5adc6af0df363977 (patch) | |
tree | bef3167a20f3fda969a69aea207fb6ffbb2108a8 /usr.bin | |
parent | dfeb01194cb433edb744467fe280393f4c7784e0 (diff) |
Move a bit of code to where it is called only if needed.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/interpreter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/mg/interpreter.c b/usr.bin/mg/interpreter.c index b5309361077..d22f2689bd5 100644 --- a/usr.bin/mg/interpreter.c +++ b/usr.bin/mg/interpreter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interpreter.c,v 1.3 2019/07/19 16:00:08 lum Exp $ */ +/* $OpenBSD: interpreter.c,v 1.4 2019/07/20 06:00:16 lum Exp $ */ /* * This file is in the public domain. * @@ -20,7 +20,7 @@ * like: * * 1. Give multiple arguments to a function that usually would accept only one: - * (find-fine a.txt b.txt. c.txt) + * (find-file a.txt b.txt. c.txt) * * 2. Define a list: * (define myfiles(list d.txt e.txt)) @@ -172,12 +172,12 @@ multiarg(char *funstr) excbuf[0] = '\0'; /* Is arg a var? */ if (!inlist) { - if ((contbuf = strndup(endp, BUFSIZE)) - == NULL) - return(FALSE); sizof = sizeof(tmpbuf); t = tmpbuf; if (isvar(&argp, &t, sizof)) { + if ((contbuf = strndup(endp, + BUFSIZE)) == NULL) + return(FALSE); *p = ' '; (void)(strlcpy(argbuf, tmpbuf, sizof) >= sizof); |