diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-14 13:13:40 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-14 13:26:40 +0100 |
commit | 5a210cc552f92459dc05c44a435acbcbbe6db9e7 (patch) | |
tree | 9911796548b5243d6a74bc5607c4963ba522db8b /source3/lib | |
parent | 1b41f670fc40ac583f546440c2a683e94eb05caf (diff) | |
download | samba-5a210cc552f92459dc05c44a435acbcbbe6db9e7.tar.gz samba-5a210cc552f92459dc05c44a435acbcbbe6db9e7.tar.bz2 samba-5a210cc552f92459dc05c44a435acbcbbe6db9e7.zip |
Rename some variables in getpwnam_alloc() for clarity
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_pw.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source3/lib/util_pw.c b/source3/lib/util_pw.c index e138273e8b..c9b26f0a4f 100644 --- a/source3/lib/util_pw.c +++ b/source3/lib/util_pw.c @@ -44,27 +44,28 @@ void flush_pwnam_cache(void) struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name) { - struct passwd *temp, *cached; + struct passwd *pw, *for_cache; - temp = (struct passwd *)memcache_lookup_talloc( + pw = (struct passwd *)memcache_lookup_talloc( NULL, GETPWNAM_CACHE, data_blob_string_const_null(name)); - if (temp != NULL) { - return tcopy_passwd(mem_ctx, temp); + if (pw != NULL) { + return tcopy_passwd(mem_ctx, pw); } - temp = sys_getpwnam(name); - if (temp == NULL) { + pw = sys_getpwnam(name); + if (pw == NULL) { return NULL; } - cached = tcopy_passwd(talloc_autofree_context(), temp); - if (cached == NULL) { + for_cache = tcopy_passwd(talloc_autofree_context(), pw); + if (for_cache == NULL) { return NULL; } - memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const_null(name), - cached); - return tcopy_passwd(mem_ctx, temp); + memcache_add_talloc(NULL, GETPWNAM_CACHE, + data_blob_string_const_null(name), for_cache); + + return tcopy_passwd(mem_ctx, pw); } struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) |