s3: Remove some unnecessary variables from libsmb/conn_cache.c
authorVolker Lendecke <vl@samba.org>
Thu, 24 Dec 2009 12:47:35 +0000 (13:47 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 24 Dec 2009 14:24:35 +0000 (15:24 +0100)
source3/libsmb/conncache.c

index b3086e90294fabac0ca30a4e4aced9e5a26a131a..c4c53d068100942e6def75ed67ce607a16e12842 100644 (file)
@@ -7,7 +7,8 @@
    Copyright (C) Andrew Bartlett       2002
    Copyright (C) Gerald (Jerry) Carter         2003
    Copyright (C) Marc VanHeyningen      2008
-   
+   Copyright (C) Volker Lendecke       2009
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
  */
 
 
-/**
- * prefix used for all entries put into the general cache
- */
-static const char NEGATIVE_CONN_CACHE_PREFIX[] = "NEG_CONN_CACHE";
-
 /**
  * Marshalls the domain and server name into the key for the gencache
  * record
@@ -53,7 +49,6 @@ static const char NEGATIVE_CONN_CACHE_PREFIX[] = "NEG_CONN_CACHE";
  */
 static char *negative_conn_cache_keystr(const char *domain, const char *server)
 {
-       const char NEGATIVE_CONN_CACHE_KEY_FMT[] = "%s/%s,%s";
        char *keystr = NULL;
 
        if (domain == NULL) {
@@ -62,8 +57,8 @@ static char *negative_conn_cache_keystr(const char *domain, const char *server)
        if (server == NULL)
                server = "";
 
-       keystr = talloc_asprintf(talloc_tos(),NEGATIVE_CONN_CACHE_KEY_FMT,
-                                NEGATIVE_CONN_CACHE_PREFIX, domain, server);
+       keystr = talloc_asprintf(talloc_tos(), "NEG_CONN_CACHE/%s,%s",
+                                domain, server);
        if (keystr == NULL) {
                DEBUG(0, ("negative_conn_cache_keystr: malloc error\n"));
        }