Mercurial > hg > toybox
diff toys/toysh.c @ 115:19b5567f0a1b
Add readlink, xreadlink(), and change xrealloc() to not fight the stupid
compiler so much.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 29 Apr 2007 19:55:21 -0400 |
parents | 7c77c6ec17ee |
children | 933766b0bd4b |
line wrap: on
line diff
--- a/toys/toysh.c Mon Apr 23 15:45:55 2007 -0400 +++ b/toys/toysh.c Sun Apr 29 19:55:21 2007 -0400 @@ -61,7 +61,7 @@ // Allocate more space if there's no room for NULL terminator. if (!((*cmd)->argc & 7)) - xrealloc((void **)cmd, + *cmd=xrealloc(*cmd, sizeof(struct command) + ((*cmd)->argc+8)*sizeof(char *)); (*cmd)->argv[(*cmd)->argc] = 0; return end;