From 14c58546a7f8e6beb5a0848eb8d27af05a8d73d3 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 8 Feb 2018 13:47:31 +0100 Subject: [PATCH] Add missing include guards In practice, these headers are included only once, but it's a good practice to always use include guards. --- app/src/controlevent.h | 4 ++-- app/src/server.h | 5 +++++ app/src/strutil.h | 5 +++++ app/src/tinyxpm.h | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/controlevent.h b/app/src/controlevent.h index 71807f64..6b87294d 100644 --- a/app/src/controlevent.h +++ b/app/src/controlevent.h @@ -1,5 +1,5 @@ -#ifndef CONTROL_EVENT_H -#define CONTROL_EVENT_H +#ifndef CONTROLEVENT_H +#define CONTROLEVENT_H #include #include diff --git a/app/src/server.h b/app/src/server.h index 3030327f..adc38ab4 100644 --- a/app/src/server.h +++ b/app/src/server.h @@ -1,3 +1,6 @@ +#ifndef SERVER_H +#define SERVER_H + #include "command.h" process_t push_server(const char *serial); @@ -6,3 +9,5 @@ process_t disable_tunnel(const char *serial); process_t start_server(const char *serial, Uint16 max_size, Uint32 bit_rate); void stop_server(process_t server); + +#endif diff --git a/app/src/strutil.h b/app/src/strutil.h index c9971410..1bf8088e 100644 --- a/app/src/strutil.h +++ b/app/src/strutil.h @@ -1,3 +1,6 @@ +#ifndef STRUTIL_H +#define STRUTIL_H + #include // like strncpy, except: @@ -12,3 +15,5 @@ size_t xstrncpy(char *dest, const char *src, size_t n); // returns the number of chars actually written (max n-1) if no trucation // occurred, or n if truncated size_t xstrjoin(char *dst, const char *const tokens[], char sep, size_t n); + +#endif diff --git a/app/src/tinyxpm.h b/app/src/tinyxpm.h index 60afb286..4bee7052 100644 --- a/app/src/tinyxpm.h +++ b/app/src/tinyxpm.h @@ -1,3 +1,8 @@ +#ifndef TINYXPM_H +#define TINYXPM_H + #include SDL_Surface *read_xpm(char *xpm[]); + +#endif