From 30192aeb4440da5f203160f9726b53aa58d28cd2 Mon Sep 17 00:00:00 2001 From: call-cc Date: Mon, 1 Jun 2020 19:42:22 -0400 Subject: [PATCH] Adhere to style guidelines --- src/dirname.c | 7 ++++--- src/pwd.c | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dirname.c b/src/dirname.c index 0f75514..831a85f 100644 --- a/src/dirname.c +++ b/src/dirname.c @@ -2,9 +2,10 @@ #include int -main(int argc, char *argv[]) { - char *dir; - if((dir = dirname(argv[1])) == NULL) { +main(int argc, char *argv[]) +{ + char *dir = dirname(argv[1]); + if(dir == NULL) { fprintf(stderr, "%s", argv[0]); return 1; } diff --git a/src/pwd.c b/src/pwd.c index a5c5919..29bc97b 100644 --- a/src/pwd.c +++ b/src/pwd.c @@ -2,7 +2,8 @@ #include int -main() { +main() +{ puts(getcwd(NULL, 0)); return 1; }