summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-19 01:55:29 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-22 16:31:32 +0200
commitc077529ba6852192c464772ce907670850210dfe (patch)
treee067689b021c42cb9c7ef57504e842dd6f0ac4de /src/basic/util.h
parentf6c2284ad340a450ac0e4f9b252aadf67e5618eb (diff)
util: drop UID_IS_INVALID() in favour of uid_is_valid()
No need to keep both functions, settle on uid_is_valid() for everything.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index 3e25ee4687..f37efd0a91 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -161,7 +161,10 @@ int parse_uid(const char *s, uid_t* ret_uid);
#define parse_gid(s, ret_gid) parse_uid(s, ret_gid)
bool uid_is_valid(uid_t uid);
-#define gid_is_valid(gid) uid_is_valid(gid)
+
+static inline bool gid_is_valid(gid_t gid) {
+ return uid_is_valid((uid_t) gid);
+}
int safe_atou(const char *s, unsigned *ret_u);
int safe_atoi(const char *s, int *ret_i);