From 2547bd75d9a6275fc6a64378bad5366c37e13baf Mon Sep 17 00:00:00 2001 From: wiidev Date: Sun, 4 Apr 2021 19:00:01 +0100 Subject: [PATCH] Remove unnecessary strcpy --- source/network/https.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/network/https.c b/source/network/https.c index 36d8177d..aec3205f 100644 --- a/source/network/https.c +++ b/source/network/https.c @@ -505,10 +505,7 @@ void downloadfile(const char *url, struct download *buffer) } // Send our request char request[2300]; - char method[5] = "HEAD"; // Get the GameTDB timestamp int ret, len; - if (!buffer->gametdbcheck) - strcpy(method, "GET"); len = snprintf(request, sizeof(request), "%s %s HTTP/1.1\r\n" "Host: %s\r\n" @@ -516,7 +513,7 @@ void downloadfile(const char *url, struct download *buffer) "Connection: close\r\n" "Pragma: no-cache\r\n" "Cache-Control: no-cache\r\n\r\n", - method, path, host, GetRev()); + buffer->gametdbcheck ? "HEAD" : "GET", path, host, GetRev()); if ((ret = https_write(&httpinfo, request, len, false)) != len) { #ifdef DEBUG_NETWORK