[Git][NTPsec/ntpsec][master] Add missing header idempotency guards

Matt Selsky gitlab at mg.gitlab.com
Wed Dec 26 07:05:35 UTC 2018


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
304abfee by Matt Selsky at 2018-12-26T07:00:11Z
Add missing header idempotency guards

Identified with help from http://lgtm.com's scanner

- - - - -


3 changed files:

- include/ntp_filegen.h
- include/ntpd.h
- ntpfrob/ntpfrob.h


Changes:

=====================================
include/ntp_filegen.h
=====================================
@@ -6,6 +6,8 @@
  *
  * SPDX-License-Identifier: BSD-2-clause
  */
+#ifndef GUARD_NTP_FILEGEN_H
+#define GUARD_NTP_FILEGEN_H
 
 #include "ntp_types.h"
 
@@ -50,3 +52,5 @@ extern	void	filegen_register (const char *, const char *, FILEGEN *);
 #ifdef DEBUG
 extern	void	filegen_unregister(const char *);
 #endif
+
+#endif	/* GUARD_NTP_FILEGEN_H */


=====================================
include/ntpd.h
=====================================
@@ -7,6 +7,8 @@
  *
  * Each half is further divided into sections for each source file.
  */
+#ifndef GUARD_NTPD_H
+#define GUARD_NTPD_H
 
 #include "ntp.h"
 #include "ntp_stdlib.h"
@@ -417,3 +419,4 @@ extern struct refclock * const refclock_conf[];
 extern const uint8_t	num_refclock_conf;
 #endif
 
+#endif	/* GUARD_NTPD_H */


=====================================
ntpfrob/ntpfrob.h
=====================================
@@ -1,6 +1,9 @@
 /*
  * Our methods, one per linked module
  */
+#ifndef GUARD_NTPFROB_H
+#define GUARD_NTPFROB_H
+
 #include <stdbool.h>      /* for bool */
 #include <stdint.h>       /* for int64_t */
 #include "ntp_fp.h"       /* for l_fp */
@@ -17,3 +20,4 @@ extern void stepback(void);
 extern void tickadj(const bool mode, const int tick);
 
 /*end */
+#endif	/* GUARD_NTPFROB_H */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/304abfeed1aba274c0b5bf3ceffdcbbd0b80dd87

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/304abfeed1aba274c0b5bf3ceffdcbbd0b80dd87
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20181226/ae4a7d58/attachment-0001.html>


More information about the vc mailing list