lib: remove redundant code

Closes https://github.com/curl/curl/pull/6576
This commit is contained in:
Marcel Raad 2021-02-07 09:29:59 +01:00
parent cc9c4e0f4e
commit 1cd823ed5a
No known key found for this signature in database
GPG key ID: 33C416EFAE4D6F02
6 changed files with 8 additions and 21 deletions

View file

@ -91,15 +91,13 @@ static bool countcheck(const char *func, int line, const char *source)
should not be made */
if(memlimit && source) {
if(!memsize) {
if(source) {
/* log to file */
curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
source, line, func);
/* log to stderr also */
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
source, line, func);
fflush(curl_dbg_logfile); /* because it might crash now */
}
/* log to file */
curl_dbg_log("LIMIT %s:%d %s reached memlimit\n",
source, line, func);
/* log to stderr also */
fprintf(stderr, "LIMIT %s:%d %s reached memlimit\n",
source, line, func);
fflush(curl_dbg_logfile); /* because it might crash now */
errno = ENOMEM;
return TRUE; /* RETURN ERROR! */
}