minor corrections

This commit is contained in:
van Hauser
2019-08-09 00:34:26 +02:00
parent 73d02f3a80
commit 41d2e7d6b6
4 changed files with 8 additions and 4 deletions

View File

@ -20,9 +20,12 @@
int main(int argc, char** argv) {
char buf[8];
char buff[8];
char *buf = buff;
if (read(0, buf, sizeof(buf)) < 1) {
if (argc > 1)
buf = argv[1];
else if (read(0, buf, sizeof(buf)) < 1) {
printf("Hum?\n");
exit(1);
}