mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
tidy-up: make conditional checks more consistent
... remove '== NULL' and '!= 0' Closes #6912
This commit is contained in:
parent
19ea52da4d
commit
063d3f3b96
85 changed files with 282 additions and 283 deletions
|
|
@ -13,7 +13,7 @@
|
|||
* See the main() function at the bottom that shows an app that retrieves from
|
||||
* a specified url using fgets() and fread() and saves as two output files.
|
||||
*
|
||||
* Copyright (c) 2003 - 2019 Simtec Electronics
|
||||
* Copyright (c) 2003 - 2021 Simtec Electronics
|
||||
*
|
||||
* Re-implemented by Vincent Sanders <vince@kyllikki.org> with extensive
|
||||
* reference to original curl example code
|
||||
|
|
@ -107,7 +107,7 @@ static size_t write_callback(char *buffer,
|
|||
if(size > rembuff) {
|
||||
/* not enough space in buffer */
|
||||
newbuff = realloc(url->buffer, url->buffer_len + (size - rembuff));
|
||||
if(newbuff == NULL) {
|
||||
if(!newbuff) {
|
||||
fprintf(stderr, "callback buffer grow failed\n");
|
||||
size = rembuff;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue