Apply the SET_IF_NOT_NULL() semantic patch
spatch --sp-file cocci/set_if_not_null.spatch --use-gitgrep --dir "." --include-headers --in-place
This commit is contained in:
@@ -1114,9 +1114,7 @@ sanity_check_data_file(const char *fname, char **errp) {
|
||||
FILE *f = NULL;
|
||||
int result = -1;
|
||||
|
||||
if (errp != NULL) {
|
||||
*errp = NULL;
|
||||
}
|
||||
SET_IF_NOT_NULL(errp, NULL);
|
||||
|
||||
f = fopen(fname, "r");
|
||||
if (f == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user