aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-05 08:56:43 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-05 08:56:43 -0400
commitc94bbb169889ec8827c373ebd6cfadf9f330218e (patch)
tree501bb0c99017e53cfecef58c970a04aee8e0bbdf
parent04f493eeecd67ad28322cba7cc0d2ca264ab97eb (diff)
downloadopendircolors-c94bbb169889ec8827c373ebd6cfadf9f330218e.tar.gz
opendircolors-c94bbb169889ec8827c373ebd6cfadf9f330218e.tar.zst
opendircolors-c94bbb169889ec8827c373ebd6cfadf9f330218e.zip
Add format rule
-rw-r--r--Makefile3
-rw-r--r--dirconvert.c3
-rw-r--r--opendircolors.c1
3 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cc2c299..7a0c5d5 100644
--- a/Makefile
+++ b/Makefile
@@ -9,4 +9,7 @@ SYMLINKS+= opendircolors.1.gz ${MANDIR}1/dircolors.1.gz
MAKEOBJDIR=obj
+format:
+ find ${.CURDIR} -type f -name '*.c' -exec clang-format -i {} \;
+
.include <bsd.progs.mk>
diff --git a/dirconvert.c b/dirconvert.c
index 3cafd51..41982c1 100644
--- a/dirconvert.c
+++ b/dirconvert.c
@@ -96,6 +96,7 @@ usage(const char *progname)
char *path;
path = strdup(progname);
- (void)fprintf(stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path));
+ (void)fprintf(
+ stderr, "usage: %s LSCOLORS | LS_COLORS\n", basename(path));
exit(EX_USAGE);
}
diff --git a/opendircolors.c b/opendircolors.c
index bda00dc..21855ba 100644
--- a/opendircolors.c
+++ b/opendircolors.c
@@ -119,7 +119,6 @@ main(int argc, char **argv)
if (*line == '.') {
sprintf(out + strlen(out), "*%s=%s:", fmttype, val);
continue;
- ;
} else if (*line == '*') {
sprintf(out + strlen(out), "%s=%s:", fmttype, val);
continue;