]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-compat-util: move content inside ifdef/endif guards
authorJeff King <peff@peff.net>
Thu, 27 Oct 2016 17:30:30 +0000 (13:30 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Oct 2016 17:36:45 +0000 (10:36 -0700)
Commit 3f2e2297b9 (add an extra level of indirection to
main(), 2016-07-01) added a declaration to git-compat-util.h,
but it was accidentally placed after the final #endif that
guards against multiple inclusions.

This doesn't have any actual impact on the code, since it's
not incorrect to repeat a function declaration in C. But
it's a bad habit, and makes it more likely for somebody else
to make the same mistake. It also defeats gcc's optimization
to avoid opening header files whose contents are completely
guarded.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h

index 1930444ef092f2b5834d12b73b4d2d0c050f3551..f5b5d2e714e4feaa51ce5ce6a8663d599c7f77e5 100644 (file)
@@ -1044,6 +1044,6 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
 #define getc_unlocked(fh) getc(fh)
 #endif
 
-#endif
-
 extern int cmd_main(int, const char **);
+
+#endif