Skip to content

Commit 46efd28

Browse files
devzero2000gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5fa0f52 commit 46efd28

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

kwset.h

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef KWSET_H
2+
#define KWSET_H
3+
14
/* This file has been copied from commit e7ac713d^ in the GNU grep git
25
* repository. A few small changes have been made to adapt the code to
36
* Git.
@@ -59,3 +62,4 @@ size_t kwsexec(kwset_t, char const *, size_t, struct kwsmatch *);
5962
/* Deallocate the given keyword set and all its associated storage. */
6063
void kwsfree(kwset_t);
6164

65+
#endif /* KWSET_H */

tar.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef TAR_H
2+
#define TAR_H
3+
14
#define TYPEFLAG_AUTO '\0'
25
#define TYPEFLAG_REG '0'
36
#define TYPEFLAG_LNK '2'
@@ -23,3 +26,5 @@ struct ustar_header {
2326
char devminor[8]; /* 337 */
2427
char prefix[155]; /* 345 */
2528
};
29+
30+
#endif /* TAR_H */

0 commit comments

Comments
 (0)