diff options
| author | Andreas Baumann <mail@andreasbaumann.cc> | 2026-01-23 08:57:19 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2026-04-08 18:17:06 +0200 |
| commit | aa155267bf366ba779ae5ec7fb033c28b54b266e (patch) | |
| tree | e11a18faf34c4d4284388b1ce99bf1aee9e44c91 /plugins/common.h | |
| parent | 3a6f9292f147de29b21dafa4cf9b7efce3e4cbfd (diff) | |
| download | monitoring-plugins-aa155267bf366ba779ae5ec7fb033c28b54b266e.tar.gz | |
added CHECK_EOF to work around warnings about EOF and -1 being the same
Diffstat (limited to 'plugins/common.h')
| -rw-r--r-- | plugins/common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/common.h b/plugins/common.h index b3053486..9d1434a3 100644 --- a/plugins/common.h +++ b/plugins/common.h | |||
| @@ -205,4 +205,11 @@ enum { | |||
| 205 | # define __attribute__(x) /* do nothing */ | 205 | # define __attribute__(x) /* do nothing */ |
| 206 | #endif | 206 | #endif |
| 207 | 207 | ||
| 208 | /* for checking the result of getopt_long */ | ||
| 209 | #if EOF == -1 | ||
| 210 | #define CHECK_EOF(c) ((c) == EOF) | ||
| 211 | #else | ||
| 212 | #define CHECK_EOF(c) ((c) == -1 || (c) == EOF) | ||
| 213 | #endif | ||
| 214 | |||
| 208 | #endif /* _COMMON_H_ */ | 215 | #endif /* _COMMON_H_ */ |
