kset.h, tar.h: add missing header guard to prevent multiple inclusion
Add missing headers to prevent ill-effects from multiple inclusion. Found by the LGTM source code analyzer. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Nov 7, 2019 at 10:12 UTC
46efd28be15a7ce27b3a0594497533e67bac0d81
2 files changed
+9
kwset.h
+4
@@ -1,3 +1,6 @@
1
+#ifndef KWSET_H
2
+#define KWSET_H
3
+
4
/* This file has been copied from commit e7ac713d^ in the GNU grep git
5
* repository. A few small changes have been made to adapt the code to
6
* Git.
@@ -59,3 +62,4 @@ size_t kwsexec(kwset_t, char const *, size_t, struct kwsmatch *);
62
/* Deallocate the given keyword set and all its associated storage. */
63
void kwsfree(kwset_t);
64
65
+#endif /* KWSET_H */
tar.h
+5
@@ -1,3 +1,6 @@
1
+#ifndef TAR_H
2
+#define TAR_H
3
+
4
#define TYPEFLAG_AUTO '\0'
5
#define TYPEFLAG_REG '0'
6
#define TYPEFLAG_LNK '2'
@@ -23,3 +26,5 @@ struct ustar_header {
26
char devminor[8]; /* 337 */
27
char prefix[155]; /* 345 */
28
};
29
+
30
+#endif /* TAR_H */