k9core

Coreutils for *nix operating systems (fork)
git clone git://bvnf.space/k9core.git
Log | Files | Refs | LICENSE

commit 30192aeb4440da5f203160f9726b53aa58d28cd2
parent cb17679d676d67fd4893dd4f07dd7e461eabdf4a
Author: call-cc <callcc@vxempire.xyz>
Date:   Mon,  1 Jun 2020 19:42:22 -0400

Adhere to style guidelines

Diffstat:
Msrc/dirname.c | 7++++---
Msrc/pwd.c | 3++-
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/dirname.c b/src/dirname.c @@ -2,9 +2,10 @@ #include <libgen.h> 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 @@ -2,7 +2,8 @@ #include <stdio.h> int -main() { +main() +{ puts(getcwd(NULL, 0)); return 1; }