diff options
Diffstat (limited to 'clients/common/nm-vpn-helpers.c')
| -rw-r--r-- | clients/common/nm-vpn-helpers.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index 204b7c28..ffae5f55 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ /* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Copyright 2013 - 2015 Red Hat, Inc. + * Copyright (C) 2013 - 2015 Red Hat, Inc. */ /** @@ -390,13 +378,14 @@ nm_vpn_wireguard_import (const char *filename, return FALSE; } - if (nm_utils_file_get_contents (-1, - filename, - 10*1024*1024, - NM_UTILS_FILE_GET_CONTENTS_FLAG_SECRET, - &file_content.str, - &file_content.len, - error) < 0) + if (!nm_utils_file_get_contents (-1, + filename, + 10*1024*1024, + NM_UTILS_FILE_GET_CONTENTS_FLAG_SECRET, + &file_content.str, + &file_content.len, + NULL, + error)) return NULL; /* We interpret the file like `wg-quick up` and `wg setconf` do. |