diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Utils/parse_release.cpp | 4 | ||||
-rw-r--r-- | lib/Utils/xfuncs.cpp | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/Utils/parse_release.cpp b/lib/Utils/parse_release.cpp index b96cab76..8a106b69 100644 --- a/lib/Utils/parse_release.cpp +++ b/lib/Utils/parse_release.cpp @@ -11,7 +11,7 @@ void parse_release(const char *pRelease, string& pProduct, string& pVersion) { pProduct = "Fedora"; pVersion = "rawhide"; - VERB3 log("%s:Version is '%s' and product is '%s'",__func__, pVersion.c_str(), pProduct.c_str()); + VERB3 log("%s: version:'%s' product:'%s'", __func__, pVersion.c_str(), pProduct.c_str()); return; } if (strstr(pRelease, "Fedora")) @@ -36,5 +36,5 @@ void parse_release(const char *pRelease, string& pProduct, string& pVersion) } space++; } - VERB3 log("%s:Version is '%s' and product is '%s'",__func__, pVersion.c_str(), pProduct.c_str()); + VERB3 log("%s: version:'%s' product:'%s'", __func__, pVersion.c_str(), pProduct.c_str()); } diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index c4b6dd6b..583171f7 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -369,13 +369,11 @@ bool string_to_bool(const char *s) return false; } -bool getuidbyname(const char* login, uid_t *uid) +uid_t getuidbyname(const char* login) { struct passwd* pwd = getpwnam(login); if (pwd == NULL) - return false; + return -1; - *uid = pwd->pw_uid; - return true; + return pwd->pw_uid; } - |