libsysprof: avoid some GError creation

This commit is contained in:
Christian Hergert
2023-08-29 13:40:06 -07:00
parent 9839d18238
commit 6ed1317012

View File

@ -490,10 +490,11 @@ sysprof_elf_loader_load (SysprofElfLoader *self,
} }
failure: failure:
g_set_error_literal (error, if (error != NULL)
G_FILE_ERROR, g_set_error_literal (error,
G_FILE_ERROR_NOENT, G_FILE_ERROR,
"Failed to locate file"); G_FILE_ERROR_NOENT,
"Failed to locate file");
return NULL; return NULL;
} }