diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-15 19:01:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-15 19:01:25 +0200 |
| commit | fff1014d1323980d5e969f31a5a17132482422ac (patch) | |
| tree | 0d0980d41f95385cc0137ec86e7a1cea0065e04c /lib/extra_opts.c | |
| parent | b1801c10846283176622db21974fe5003602630d (diff) | |
| parent | ddbabaa3b659bed9dcf5c5a2bfc430fb816277c7 (diff) | |
| download | monitoring-plugins-fff1014.tar.gz | |
Merge pull request #1937 from RincewindsHat/replace_booleans_in_lib
Replace old school booleans in lib
Diffstat (limited to 'lib/extra_opts.c')
| -rw-r--r-- | lib/extra_opts.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/extra_opts.c b/lib/extra_opts.c index f4d5e66a..b9843eba 100644 --- a/lib/extra_opts.c +++ b/lib/extra_opts.c | |||
| @@ -1,23 +1,23 @@ | |||
| 1 | /***************************************************************************** | 1 | /***************************************************************************** |
| 2 | * | 2 | * |
| 3 | * Monitoring Plugins extra_opts library | 3 | * Monitoring Plugins extra_opts library |
| 4 | * | 4 | * |
| 5 | * License: GPL | 5 | * License: GPL |
| 6 | * Copyright (c) 2007 Monitoring Plugins Development Team | 6 | * Copyright (c) 2007 Monitoring Plugins Development Team |
| 7 | * | 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify | 8 | * This program is free software: you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation, either version 3 of the License, or | 10 | * the Free Software Foundation, either version 3 of the License, or |
| 11 | * (at your option) any later version. | 11 | * (at your option) any later version. |
| 12 | * | 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, | 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
| 17 | * | 17 | * |
| 18 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | * | 20 | * |
| 21 | *****************************************************************************/ | 21 | *****************************************************************************/ |
| 22 | 22 | ||
| 23 | #include "common.h" | 23 | #include "common.h" |
| @@ -26,15 +26,14 @@ | |||
| 26 | #include "extra_opts.h" | 26 | #include "extra_opts.h" |
| 27 | 27 | ||
| 28 | /* FIXME: copied from utils.h; we should move a bunch of libs! */ | 28 | /* FIXME: copied from utils.h; we should move a bunch of libs! */ |
| 29 | int | 29 | bool is_option2 (char *str) |
| 30 | is_option2 (char *str) | ||
| 31 | { | 30 | { |
| 32 | if (!str) | 31 | if (!str) |
| 33 | return FALSE; | 32 | return false; |
| 34 | else if (strspn (str, "-") == 1 || strspn (str, "-") == 2) | 33 | else if (strspn (str, "-") == 1 || strspn (str, "-") == 2) |
| 35 | return TRUE; | 34 | return true; |
| 36 | else | 35 | else |
| 37 | return FALSE; | 36 | return false; |
| 38 | } | 37 | } |
| 39 | 38 | ||
| 40 | /* this is the externally visible function used by plugins */ | 39 | /* this is the externally visible function used by plugins */ |
