Fixes for #23 and #24, violations of the C standard

This commit is contained in:
Marc Di Luzio 2018-04-12 10:47:42 +01:00
parent 3a91960fb5
commit 9bb3ebf34b
2 changed files with 5 additions and 4 deletions

View File

@ -58,6 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <signal.h> #include <signal.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <stdlib.h>
#define USAGE_TEXT \ #define USAGE_TEXT \
"Usage: %s [-d] [-l] [-h] [-v]\n\n" \ "Usage: %s [-d] [-l] [-h] [-v]\n\n" \
@ -77,7 +78,7 @@ static void sigint_handler(__attribute__((unused)) int signo)
/* Clean up nicely */ /* Clean up nicely */
game_mode_context_destroy(game_mode_context_instance()); game_mode_context_destroy(game_mode_context_instance());
exit(EXIT_SUCCESS); _Exit(EXIT_SUCCESS);
} }
/** /**

View File

@ -28,8 +28,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef _CLIENT_GAMEMODE_H_ #ifndef CLIENT_GAMEMODE_H
#define _CLIENT_GAMEMODE_H_ #define CLIENT_GAMEMODE_H
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@ -212,4 +212,4 @@ int gamemode_request_end(void)
return 0; return 0;
} }
#endif // _CLIENT_GAMEMODE_H_ #endif // CLIENT_GAMEMODE_H