Commit b3a78211e5d83fb5c259b000222173ba542560bc

Thomas de Grivel 2021-01-08T10:06:16

std=c89

diff --git a/Makefile b/Makefile
index 9087d47..936836c 100644
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,8 @@ GIT_SHELL ?= /usr/local/bin/git-shell
 CPPFLAGS = -DGIT_SHELL=\"${GIT_SHELL}\"
 DEBUG ?= -ggdb -DDEBUG
 WARNINGS ?= yes
-CDIAGFLAGS ?= -W -Wall -Werror
-LDFLAGS += -W -Wall -Werror
+CDIAGFLAGS ?= -W -Wall -Werror -std=c89 -pedantic
+LDFLAGS += -W -Wall -Werror -std=c89 -pedantic
 
 SRCS =	git-auth.c \
 	rule.c rule.h \
diff --git a/git-auth.c b/git-auth.c
index 4e75b11..19cf6a9 100644
--- a/git-auth.c
+++ b/git-auth.c
@@ -187,12 +187,12 @@ int main (int argc, char **argv)
         cmd_argv[1] = argv[2];
         cmd_argv[2] = argv[3];
         read_rules(rules, "/etc/git-auth.conf");
-        // log_rules(rules);
+        /* log_rules(rules); */
         auth_ok = auth(rules, 3, cmd_argv);
         log_cmd(auth_ok ? "ALLOW" : "DENY", 3, cmd_argv);
         if (auth_ok) {
                 exec_cmd(3, cmd_argv);
-                // never reached
+                /* never reached */
         }
         cleanup();
         return 1;
diff --git a/rule.c b/rule.c
index 2db6d3a..16afde0 100644
--- a/rule.c
+++ b/rule.c
@@ -156,7 +156,7 @@ int read_rules (s_rule rules[RULES_MAX], const char *path)
                         bzero(&rules[r], sizeof(s_rule));
                         if (error)
                                 exit(1);
-                        // fprintf(stderr, "fgets NULL. r: %d\n", r);
+                        /* fprintf(stderr, "fgets NULL. r: %d\n", r); */
                         return r;
                 }
                 if (!(nl = strchr(buf, '\n'))) {
@@ -178,6 +178,6 @@ int read_rules (s_rule rules[RULES_MAX], const char *path)
         bzero(&rules[r], sizeof(s_rule));
         if (error)
                 exit(1);
-        // fprintf(stderr, "EOF. r: %d\n", r);
+        /* fprintf(stderr, "EOF. r: %d\n", r); */
         return r;
 }