mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-21 22:04:15 +03:00
remote: Fix gcc -fanalyzer
warning
In general, we're probably going to need to change most of our `g_return_if_fail` to `g_assert`. The analyzer flags that the function can return `NULL`, but the caller isn't prepared for this. In practice, let's abort.
This commit is contained in:
parent
16157e77e5
commit
a8eed03a19
@ -65,8 +65,8 @@ ostree_remote_new_dynamic (const gchar *name,
|
|||||||
{
|
{
|
||||||
OstreeRemote *remote;
|
OstreeRemote *remote;
|
||||||
|
|
||||||
g_return_val_if_fail (name != NULL && *name != '\0', NULL);
|
g_assert (name != NULL && *name != '\0');
|
||||||
g_return_val_if_fail (refspec_name == NULL || *refspec_name != '\0', NULL);
|
g_assert (refspec_name == NULL || *refspec_name != '\0');
|
||||||
|
|
||||||
remote = g_slice_new0 (OstreeRemote);
|
remote = g_slice_new0 (OstreeRemote);
|
||||||
remote->ref_count = 1;
|
remote->ref_count = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user