From 9bb3ebf34b04eeb094948cc0d17de4ae24c3a2a8 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Thu, 12 Apr 2018 10:47:42 +0100 Subject: [PATCH] Fixes for #23 and #24, violations of the C standard --- daemon/main.c | 3 ++- lib/gamemode_client.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index f4caf8c..bfeed5b 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -58,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #define USAGE_TEXT \ "Usage: %s [-d] [-l] [-h] [-v]\n\n" \ @@ -77,7 +78,7 @@ static void sigint_handler(__attribute__((unused)) int signo) /* Clean up nicely */ game_mode_context_destroy(game_mode_context_instance()); - exit(EXIT_SUCCESS); + _Exit(EXIT_SUCCESS); } /** diff --git a/lib/gamemode_client.h b/lib/gamemode_client.h index aff187f..8572fcb 100644 --- a/lib/gamemode_client.h +++ b/lib/gamemode_client.h @@ -28,8 +28,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _CLIENT_GAMEMODE_H_ -#define _CLIENT_GAMEMODE_H_ +#ifndef CLIENT_GAMEMODE_H +#define CLIENT_GAMEMODE_H #include #include #include @@ -212,4 +212,4 @@ int gamemode_request_end(void) return 0; } -#endif // _CLIENT_GAMEMODE_H_ +#endif // CLIENT_GAMEMODE_H