diff options
author | Elliott Hughes <enh@google.com> | 2015-01-22 11:02:59 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-01-22 11:02:59 -0800 |
commit | c56af08c21fd93c50303370015071527e110e05d (patch) | |
tree | c5e949707d796bec4d7e116509bdddf79bcebb31 | |
parent | d1668a71df761eb1644496f3e2c77c16fd54bb06 (diff) | |
download | bionic-c56af08c21fd93c50303370015071527e110e05d.zip bionic-c56af08c21fd93c50303370015071527e110e05d.tar.gz bionic-c56af08c21fd93c50303370015071527e110e05d.tar.bz2 |
Use a more specific return type for app_id_from_name.
I suspect we can simplify this code, but I don't know enough about it
to get involved now.
Change-Id: I1c39761ae31beb70d41ffa6f0e396a4f17529d46
-rw-r--r-- | libc/bionic/stubs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/stubs.cpp b/libc/bionic/stubs.cpp index 1e487b4..1264fd7 100644 --- a/libc/bionic/stubs.cpp +++ b/libc/bionic/stubs.cpp @@ -207,7 +207,7 @@ static group* android_name_to_group(group_state_t* state, const char* name) { // u2_i1000 -> 2 * AID_USER + AID_ISOLATED_START + 1000 // u1_system -> 1 * AID_USER + android_ids['system'] // returns 0 and sets errno to ENOENT in case of error -static unsigned app_id_from_name(const char* name, bool is_group) { +static id_t app_id_from_name(const char* name, bool is_group) { char* end; unsigned long userid; bool is_shared_gid = false; @@ -272,7 +272,7 @@ static unsigned app_id_from_name(const char* name, bool is_group) { return 0; } - return static_cast<unsigned>(appid + userid*AID_USER); + return (appid + userid*AID_USER); } static void print_app_name_from_uid(const uid_t uid, char* buffer, const int bufferlen) { |