summaryrefslogtreecommitdiff
path: root/user/wc.c
diff options
context:
space:
mode:
Diffstat (limited to 'user/wc.c')
-rw-r--r--user/wc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/user/wc.c b/user/wc.c
index 5dd4e7b..6a851ca 100644
--- a/user/wc.c
+++ b/user/wc.c
@@ -27,7 +27,7 @@ wc(int fd, char *name)
}
if(n < 0){
printf("wc: read error\n");
- exit(-1);
+ exit(1);
}
printf("%d %d %d %s\n", l, w, c, name);
}
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
printf("wc: cannot open %s\n", argv[i]);
- exit(-1);
+ exit(1);
}
wc(fd, argv[i]);
close(fd);