s3: Remove two pointless slprintf calls
authorVolker Lendecke <vl@samba.org>
Sat, 11 Dec 2010 13:16:51 +0000 (14:16 +0100)
committerVolker Lendecke <vlendec@samba.org>
Sun, 19 Dec 2010 22:25:06 +0000 (23:25 +0100)
source3/libsmb/samlogon_cache.c

index 2e7a9c6b031b2270af6fe5e6c0c02b335ccead42..52fbe04351b0d9669c2c6f6a18ef4838562c0688 100644 (file)
@@ -102,7 +102,7 @@ bool netsamlogon_cache_shutdown(void)
 void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
 {
        struct dom_sid  user_sid;
-       fstring keystr, tmp;
+       fstring keystr;
 
        if (!info3) {
                return;
@@ -117,7 +117,7 @@ void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
        sid_compose(&user_sid, info3->base.domain_sid, info3->base.rid);
 
        /* Prepare key as DOMAIN-SID/USER-RID string */
-       slprintf(keystr, sizeof(keystr), "%s", sid_to_fstring(tmp, &user_sid));
+       sid_to_fstring(keystr, &user_sid);
 
        DEBUG(10,("netsamlogon_clear_cached_user: SID [%s]\n", keystr));
 
@@ -132,7 +132,7 @@ void netsamlogon_clear_cached_user(struct netr_SamInfo3 *info3)
 bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
 {
        TDB_DATA data;
-       fstring keystr, tmp;
+       fstring keystr;
        bool result = false;
        struct dom_sid  user_sid;
        time_t t = time(NULL);
@@ -154,7 +154,7 @@ bool netsamlogon_cache_store(const char *username, struct netr_SamInfo3 *info3)
        sid_compose(&user_sid, info3->base.domain_sid, info3->base.rid);
 
        /* Prepare key as DOMAIN-SID/USER-RID string */
-       slprintf(keystr, sizeof(keystr), "%s", sid_to_fstring(tmp, &user_sid));
+       sid_to_fstring(keystr, &user_sid);
 
        DEBUG(10,("netsamlogon_cache_store: SID [%s]\n", keystr));