summaryrefslogtreecommitdiffstats
path: root/plugins/common.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2026-01-23 08:57:19 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2026-01-23 08:57:19 +0100
commit8d44bd8e6902dbb49e98c12bb6bf3d9e4c4b413f (patch)
tree918eef8c998f2e504de567249b19d635151ac2b7 /plugins/common.h
parent5ede6918907f9a258fe9630f2f5cf668c0bbc6ce (diff)
downloadmonitoring-plugins-8d44bd8e6902dbb49e98c12bb6bf3d9e4c4b413f.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.h7
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_ */