libnm-core/utils: (trivial) use g_set_error_literal() where appropriate

This commit is contained in:
Lubomir Rintel 2017-11-27 19:08:21 +01:00
parent b49c7e026f
commit 9a00750c06

View file

@ -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;
}
}