mirror of
https://github.com/curl/curl.git
synced 2026-08-25 01:03:31 +03:00
build: fix Codacy warnings
Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975
This commit is contained in:
parent
04ac54e196
commit
e23c52b329
23 changed files with 80 additions and 123 deletions
|
|
@ -137,7 +137,6 @@ size_t SyncTime_CURL_WriteOutput(void *ptr, size_t size, size_t nmemb,
|
|||
size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
|
||||
void *stream)
|
||||
{
|
||||
int i, RetVal;
|
||||
char TmpStr1[26], TmpStr2[26];
|
||||
|
||||
(void)stream;
|
||||
|
|
@ -156,11 +155,13 @@ size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
|
|||
TmpStr1 & 2? */
|
||||
AutoSyncTime = 0;
|
||||
else {
|
||||
RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
|
||||
TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
|
||||
&SYSTime.wHour, &SYSTime.wMinute, &SYSTime.wSecond);
|
||||
int RetVal = sscanf((char *)(ptr), "Date: %s %hu %s %hu %hu:%hu:%hu",
|
||||
TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
|
||||
&SYSTime.wHour, &SYSTime.wMinute,
|
||||
&SYSTime.wSecond);
|
||||
|
||||
if(RetVal == 7) {
|
||||
int i;
|
||||
SYSTime.wMilliseconds = 500; /* adjust to midpoint, 0.5 sec */
|
||||
for(i = 0; i<12; i++) {
|
||||
if(strcmp(MthStr[i], TmpStr2) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue