mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-06 14:00:39 +01:00
libnm-core/utils: (trivial) use g_set_error_literal() where appropriate
(cherry picked from commit 9a00750c06)
This commit is contained in:
parent
d3abc7aed1
commit
faa6ddc272
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"
|
||||
|
|
@ -5446,8 +5446,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;
|
||||
|
|
@ -5464,8 +5466,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