diff options
Diffstat (limited to 'userspace/foolshell.c')
| -rw-r--r-- | userspace/foolshell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/userspace/foolshell.c b/userspace/foolshell.c index fa62094..ba73e1d 100644 --- a/userspace/foolshell.c +++ b/userspace/foolshell.c @@ -74,7 +74,7 @@ int main(int argc, char **argv) if(!silent)hello(); //char *buf=malloc(256); - char buf[256]; + char *buf=calloc(sizeof(char),256); while(1) { @@ -101,7 +101,7 @@ char **tokenize(char *buf) for(i=0;i<l;i++) { // init space for next token - token[c]=calloc(sizeof(char),256); + token[c]=malloc(256); //skip all the whitespace while(buf[i]==' '&&i<l)i++; |
