mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 04:40:20 +01:00
libnm-core/utils: (trivial) use g_set_error_literal() where appropriate
This commit is contained in:
parent
b49c7e026f
commit
9a00750c06
1 changed files with 9 additions and 5 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue