diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2022-05-17 15:30:19 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2022-05-17 15:30:19 +0200 |
| commit | 1e636d8e5e986b9f2260c36bb87fb499d724085c (patch) | |
| tree | ac613b9372adf622496a7d616050d7e1c09b4fba /src/nmcli/utils.c | |
| parent | f4966e573c855d4667e6c236d8197d9949020e21 (diff) | |
| parent | 1a31bc3c63474ca02c83b02add85ea4e740e5597 (diff) | |
Merge remote-tracking branch 'debian/debian/master' into ubuntu/master
Diffstat (limited to 'src/nmcli/utils.c')
| -rw-r--r-- | src/nmcli/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nmcli/utils.c b/src/nmcli/utils.c index 7645a08c..209a5b69 100644 --- a/src/nmcli/utils.c +++ b/src/nmcli/utils.c @@ -156,7 +156,7 @@ next_arg(NmCli *nmc, int *argc, const char *const **argv, ...) va_list args; const char *cmd_option; - g_assert(*argc >= 0); + g_return_val_if_fail(*argc >= 0, -1); do { int cmd_option_pos = 1; @@ -1229,7 +1229,7 @@ _print_do(const NmcConfig *nmc_config, guint i_row, i_col; nm_auto_free_gstring GString *str = NULL; - g_assert(col_len); + g_return_if_fail(col_len); /* Main header */ if (nmc_config->print_output == NMC_PRINT_PRETTY && header_name_no_l10n) { @@ -1628,7 +1628,7 @@ print_required_fields(const NmcConfig *nmc_config, gboolean is_array = field_values[idx].value_is_array; /* section prefix can't be an array */ - g_assert(!is_array || !section_prefix || idx != 0); + g_return_if_fail(!is_array || !section_prefix || idx != 0); if (section_prefix && idx == 0) /* The first field is section prefix */ continue; |