Skip to content

Commit 5c238e2

Browse files
peffgitster
authored andcommitted
git-compat-util: move content inside ifdef/endif guards
Commit 3f2e229 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent de61ceb commit 5c238e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-compat-util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,6 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
10441044
#define getc_unlocked(fh) getc(fh)
10451045
#endif
10461046

1047-
#endif
1048-
10491047
extern int cmd_main(int, const char **);
1048+
1049+
#endif

0 commit comments

Comments
 (0)