diff options
author | Rob Landley <rob@landley.net> | 2021-04-08 11:28:13 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-04-08 11:28:13 -0500 |
commit | 4fe080d418333afeb486f478c332bbcdace37f1b (patch) | |
tree | a02658931615de17c6cd7eb9f3c6f079158966b2 /lib | |
parent | 2a6f03eb088b21a68ee4f5fa45b7cd4f7c7bc558 (diff) | |
download | toybox-4fe080d418333afeb486f478c332bbcdace37f1b.tar.gz |
Fix typo in the xexec tweak.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xwrap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c index 3f2e3f77..64137da9 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -96,7 +96,6 @@ void *xrealloc(void *ptr, size_t size) char *xstrndup(char *s, size_t n) { char *ret = strndup(s, n); - if (!ret) error_exit("xstrndup"); return ret; @@ -127,8 +126,7 @@ char *xmprintf(char *format, ...) va_copy(va2, va); // How long is it? - len = vsnprintf(0, 0, format, va); - len++; + len = vsnprintf(0, 0, format, va)+1; va_end(va); // Allocate and do the sprintf() @@ -226,7 +224,7 @@ void xexec(char **argv) { // Only recurse to builtin when we have multiplexer and !vfork context. if (CFG_TOYBOX && !CFG_TOYBOX_NORECURSE) - if (toys.stacktop && !strchr(**argv,'/')) toy_exec(argv); + if (toys.stacktop && !strchr(*argv, '/')) toy_exec(argv); execvp(argv[0], argv); toys.exitval = 126+(errno == ENOENT); |