From 9a00750c06b685ebea234445dc214ba72e376dea Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 27 Nov 2017 19:08:21 +0100 Subject: [PATCH] libnm-core/utils: (trivial) use g_set_error_literal() where appropriate --- libnm-core/nm-utils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index 5237d20834..d79bf9eda3 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -16,7 +16,7 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * - * Copyright 2005 - 2014 Red Hat, Inc. + * Copyright 2005 - 2017 Red Hat, Inc. */ #include "nm-default.h" @@ -5407,8 +5407,10 @@ nm_utils_parse_variant_attributes (const char *string, if (*ptr == '\\') { ptr++; if (!*ptr) { - g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED, - _("unterminated escape sequence")); + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_FAILED, + _("unterminated escape sequence")); return NULL; } goto next; @@ -5425,8 +5427,10 @@ nm_utils_parse_variant_attributes (const char *string, if (*sep == '\\') { sep++; if (!*sep) { - g_set_error (error, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_FAILED, - _("unterminated escape sequence")); + g_set_error_literal (error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_FAILED, + _("unterminated escape sequence")); return NULL; } }