krb5 commit [krb5-1.10]: Clean out dead code from ccapi

Tom Yu tlyu at MIT.EDU
Wed Aug 29 19:17:44 EDT 2012


https://github.com/krb5/krb5/commit/8f08bea36cc7ebb6c726d714eb626fb783f64cb8
commit 8f08bea36cc7ebb6c726d714eb626fb783f64cb8
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date:   Tue Aug 21 11:45:49 2012 -0400

    Clean out dead code from ccapi
    
    Signed-off-by: Kevin Wasserman <kevin.wasserman at painless-security.com>
    
    (cherry picked from commit 602a3572b5c79a9ecacc1145e0a611e4f5198ebe)
    
    ticket: 7237
    version_fixed: 1.10.4
    status: resolved

 src/ccapi/common/win/tls.c |   35 -----------------------------------
 src/ccapi/common/win/tls.h |    4 ----
 2 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/src/ccapi/common/win/tls.c b/src/ccapi/common/win/tls.c
index 5743ddb..6c13d5a 100644
--- a/src/ccapi/common/win/tls.c
+++ b/src/ccapi/common/win/tls.c
@@ -29,20 +29,6 @@
 
 #include "tls.h"
 
-struct tspdata* new_tspdata(char* uuid, time_t sst) {
-    struct tspdata* p   = (struct tspdata*)malloc(sizeof(struct tspdata));
-    if (p) {
-        memset(p, 0, sizeof(struct tspdata));
-        p->_sst = sst;
-        if (uuid) {strncpy(p->_uuid, uuid, UUID_SIZE-1);}
-        }
-    return p;
-    }
-
-void delete_tspdata(struct tspdata* p) {
-    if (p)          free(p);
-    }
-
 void tspdata_setUUID(struct tspdata* p, unsigned char __RPC_FAR* uuidString) {
     strncpy(p->_uuid, uuidString, UUID_SIZE-1);
     };
@@ -74,27 +60,6 @@ char*        tspdata_getUUID      (const struct tspdata* p)         {return p->_
 
 RPC_ASYNC_STATE* tspdata_getRpcAState (const struct tspdata* p)     {return p->_rpcState;}
 
-BOOL WINAPI PutTspData(DWORD dwTlsIndex, struct tspdata* dw) {
-    LPVOID              lpvData;
-    struct tspdata**    pData;  // The stored memory pointer
-
-    // Retrieve a data pointer for the current thread:
-    lpvData = TlsGetValue(dwTlsIndex);
-
-    // If NULL, allocate memory for the TLS slot for this thread:
-    if (lpvData == NULL) {
-        lpvData = (LPVOID) LocalAlloc(LPTR, sizeof(struct tspdata));
-        if (lpvData == NULL)                      return FALSE;
-        if (!TlsSetValue(dwTlsIndex, lpvData))    return FALSE;
-        }
-
-    pData = (struct tspdata**) lpvData; // Cast to my data type.
-    // In this example, it is only a pointer to a DWORD
-    // but it can be a structure pointer to contain more complicated data.
-
-    (*pData) = dw;
-    return TRUE;
-    }
 
 BOOL WINAPI GetTspData(DWORD dwTlsIndex, struct tspdata**  pdw) {
     struct tspdata*  pData;      // The stored memory pointer
diff --git a/src/ccapi/common/win/tls.h b/src/ccapi/common/win/tls.h
index 181537f..bd2bb9e 100644
--- a/src/ccapi/common/win/tls.h
+++ b/src/ccapi/common/win/tls.h
@@ -50,9 +50,6 @@ struct tspdata {
     char                _uuid[UUID_SIZE];
     };
 
-struct tspdata* new_tspdata          (char* uuid, time_t sst);
-void            delete_tspdata       (struct tspdata* p);
-
 void            tspdata_setListening (struct tspdata* p, BOOL b);
 void            tspdata_setConnected (struct tspdata* p, BOOL b);
 void            tspdata_setReplyEvent(struct tspdata* p, HANDLE h);
@@ -69,7 +66,6 @@ time_t           tspdata_getSST      (const struct tspdata* p);
 k5_ipc_stream     tspdata_getStream   (const struct tspdata* p);
 char*            tspdata_getUUID     (const struct tspdata* p);
 
-BOOL WINAPI PutTspData(DWORD tlsIndex, struct tspdata*  dw);
 BOOL WINAPI GetTspData(DWORD tlsIndex, struct tspdata** pdw);
 
 #endif _tls_h


More information about the cvs-krb5 mailing list