From d24408730b37ff69e4886ac1e8190b0a9c435898 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 31 Jan 2019 15:13:36 +0100 Subject: [PATCH] Cleanups --- command.c | 8 ++-- gfx/display_servers/dispserv_x11.c | 69 +++++++++++++++--------------- 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/command.c b/command.c index f3214b2622..fb617da1a2 100644 --- a/command.c +++ b/command.c @@ -175,7 +175,7 @@ static bool command_version(const char* arg) { char reply[256] = {0}; - sprintf(reply, "%s\n", PACKAGE_VERSION); + snprintf(reply, sizeof(reply), "%s\n", PACKAGE_VERSION); #if defined(HAVE_CHEEVOS) && (defined(HAVE_STDIN_CMD) || defined(HAVE_NETWORK_CMD) && defined(HAVE_NETWORKING)) command_reply(reply, strlen(reply)); #endif @@ -292,7 +292,7 @@ static bool command_read_ram(const char *arg) if (data) { - for (i=0;i 400) @@ -181,7 +182,7 @@ static bool x11_display_server_set_resolution(void *data, if (roundw < 1.20) roundw = 1.34; - hbp = width * roundw - 8; + hbp = width * roundw - 8; hmax = hbp; if (height < 241)