Windows fixes: remove unreferenced; use sizeof to compute array size
authorSam Hartman <hartmans@mit.edu>
Wed, 28 Sep 2011 20:57:15 +0000 (20:57 +0000)
committerSam Hartman <hartmans@mit.edu>
Wed, 28 Sep 2011 20:57:15 +0000 (20:57 +0000)
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25272 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/mechglue/g_initialize.c

index e0bbd5ae535a32b20063dc8622da2017d85a9135..603387c7ebd372d32034dc3e218d6ad851e9713f 100644 (file)
@@ -1203,7 +1203,7 @@ getRegKeyModTime(HKEY hBaseKey, const char *keyPath)
                return 0;
        }
        do {
-               int subKeyNameSize=256;
+               int subKeyNameSize=sizeof(subKeyName)/sizeof(subKeyName[0]);
                if ((rc = RegEnumKeyEx(hConfigKey, iSubKey++, subKeyName,
                                       &subKeyNameSize, NULL, NULL, NULL,
                                       &keyLastWriteTime)) != ERROR_SUCCESS) {
@@ -1253,7 +1253,6 @@ loadConfigFromRegistry(HKEY hBaseKey, const char *keyPath)
 {
        HKEY hConfigKey;
        DWORD iSubKey, nSubKeys, maxSubKeyNameLen;
-       DWORD dataBufferSize, dataSizeRequired;
        char *oidStr = NULL, *oid = NULL, *sharedLib = NULL, *kernMod = NULL;
        char *modOptions = NULL;
        DWORD oidStrLen = 0, oidLen = 0, sharedLibLen = 0, kernModLen = 0;