[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3144-g71bc142

Volker Lendecke vlendec at samba.org
Fri Nov 14 12:15:09 GMT 2008


The branch, v3-2-test has been updated
       via  71bc142bea33af124f07b6244f97bde289fe3a2d (commit)
      from  eb99923991960e53bd150ac8f1d818cb746101b4 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 71bc142bea33af124f07b6244f97bde289fe3a2d
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Nov 14 13:13:40 2008 +0100

    Rename some variables in getpwnam_alloc() for clarity

-----------------------------------------------------------------------

Summary of changes:
 source/lib/util_pw.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/util_pw.c b/source/lib/util_pw.c
index 342e509..c0a44c7 100644
--- a/source/lib/util_pw.c
+++ b/source/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(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(NULL, temp);
-	if (cached == NULL) {
+	for_cache = tcopy_passwd(NULL, pw);
+	if (for_cache == NULL) {
 		return NULL;
 	}
 
 	memcache_add_talloc(NULL, GETPWNAM_CACHE, data_blob_string_const(name),
-			    cached);
-	return tcopy_passwd(mem_ctx, temp);
+			    for_cache);
+
+	return tcopy_passwd(mem_ctx, pw);
 }
 
 struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list