mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:43:47 +03:00
checksrc: warn for assignments within if() expressions
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
This commit is contained in:
parent
b228d2952b
commit
1c3e8bbfed
86 changed files with 413 additions and 226 deletions
|
|
@ -184,7 +184,8 @@ int GetOrSetUpData(int id, libdata_t **appData,
|
|||
*/
|
||||
NXLock(gLibLock);
|
||||
|
||||
if(!(app_data = (libdata_t *) get_app_data(id))) {
|
||||
app_data = (libdata_t *) get_app_data(id);
|
||||
if(!app_data) {
|
||||
app_data = malloc(sizeof(libdata_t));
|
||||
|
||||
if(app_data) {
|
||||
|
|
@ -259,7 +260,8 @@ int GetOrSetUpData(int id, libdata_t **appData,
|
|||
err = ENOMEM;
|
||||
}
|
||||
|
||||
if((err = NXKeySetValue(key, thread_data))) {
|
||||
err = NXKeySetValue(key, thread_data);
|
||||
if(err) {
|
||||
free(thread_data->twentybytes);
|
||||
free(thread_data);
|
||||
thread_data = (libthreaddata_t *) NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue