cli: use an error quark for domain in g_set_error() instead of 0 (rh #842975)
glib 2.32 makes a runtime check that domain is not NULL: GLib-WARNING **: (gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)
This commit is contained in:
@@ -57,6 +57,18 @@ typedef struct {
|
||||
GMainLoop *loop = NULL;
|
||||
|
||||
|
||||
/* Get an error quark for use with GError */
|
||||
GQuark
|
||||
nmcli_error_quark (void)
|
||||
{
|
||||
static GQuark error_quark = 0;
|
||||
|
||||
if (G_UNLIKELY (error_quark == 0))
|
||||
error_quark = g_quark_from_static_string ("nmcli-error-quark");
|
||||
|
||||
return error_quark;
|
||||
}
|
||||
|
||||
static void
|
||||
usage (const char *prog_name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user