diff options
| author | Michael Biebl <biebl@debian.org> | 2022-05-04 15:35:24 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-05-04 15:35:24 +0200 |
| commit | 9959fdb2e8ddd06f2161798ca0a39c77d67c652d (patch) | |
| tree | 2ce24a336d2b1c5fd5dec3090db312eded6c78ba /src/nmcli/utils.c | |
| parent | 8c623dddbdebe354cb94bfc559a5371a14865317 (diff) | |
New upstream version 1.37.92 upstream/1.37.92
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; |