summaryrefslogtreecommitdiffstats
path: root/lib/utils_cmd.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 19:01:25 +0200
committerGitHub <noreply@github.com>2023-10-15 19:01:25 +0200
commitfff1014d1323980d5e969f31a5a17132482422ac (patch)
tree0d0980d41f95385cc0137ec86e7a1cea0065e04c /lib/utils_cmd.c
parentb1801c10846283176622db21974fe5003602630d (diff)
parentddbabaa3b659bed9dcf5c5a2bfc430fb816277c7 (diff)
downloadmonitoring-plugins-fff1014d1323980d5e969f31a5a17132482422ac.tar.gz
Merge pull request #1937 from RincewindsHat/replace_booleans_in_lib
Replace old school booleans in lib
Diffstat (limited to 'lib/utils_cmd.c')
-rw-r--r--lib/utils_cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index f66fd573..cfb2073c 100644
--- a/lib/utils_cmd.c
+++ b/lib/utils_cmd.c
@@ -18,18 +18,18 @@
18* Care has been taken to make sure the functions are async-safe. The one 18* Care has been taken to make sure the functions are async-safe. The one
19* function which isn't is cmd_init() which it doesn't make sense to 19* function which isn't is cmd_init() which it doesn't make sense to
20* call twice anyway, so the api as a whole should be considered async-safe. 20* call twice anyway, so the api as a whole should be considered async-safe.
21* 21*
22* 22*
23* This program is free software: you can redistribute it and/or modify 23* This program is free software: you can redistribute it and/or modify
24* it under the terms of the GNU General Public License as published by 24* it under the terms of the GNU General Public License as published by
25* the Free Software Foundation, either version 3 of the License, or 25* the Free Software Foundation, either version 3 of the License, or
26* (at your option) any later version. 26* (at your option) any later version.
27* 27*
28* This program is distributed in the hope that it will be useful, 28* This program is distributed in the hope that it will be useful,
29* but WITHOUT ANY WARRANTY; without even the implied warranty of 29* but WITHOUT ANY WARRANTY; without even the implied warranty of
30* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31* GNU General Public License for more details. 31* GNU General Public License for more details.
32* 32*
33* You should have received a copy of the GNU General Public License 33* You should have received a copy of the GNU General Public License
34* along with this program. If not, see <http://www.gnu.org/licenses/>. 34* along with this program. If not, see <http://www.gnu.org/licenses/>.
35* 35*
@@ -377,10 +377,10 @@ cmd_file_read ( char *filename, output *out, int flags)
377 if ((fd = open(filename, O_RDONLY)) == -1) { 377 if ((fd = open(filename, O_RDONLY)) == -1) {
378 die( STATE_UNKNOWN, _("Error opening %s: %s"), filename, strerror(errno) ); 378 die( STATE_UNKNOWN, _("Error opening %s: %s"), filename, strerror(errno) );
379 } 379 }
380 380
381 if(out) 381 if(out)
382 out->lines = _cmd_fetch_output (fd, out, flags); 382 out->lines = _cmd_fetch_output (fd, out, flags);
383 383
384 if (close(fd) == -1) 384 if (close(fd) == -1)
385 die( STATE_UNKNOWN, _("Error closing %s: %s"), filename, strerror(errno) ); 385 die( STATE_UNKNOWN, _("Error closing %s: %s"), filename, strerror(errno) );
386 386