apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r170455 - /apr/apr/trunk/user/win32/userinfo.c
Date Mon, 16 May 2005 21:35:46 GMT
Author: wrowe
Date: Mon May 16 14:35:45 2005
New Revision: 170455

URL: http://svn.apache.org/viewcvs?rev=170455&view=rev
Log:

  An internal API - buffer len values should be size_t

Modified:
    apr/apr/trunk/user/win32/userinfo.c

Modified: apr/apr/trunk/user/win32/userinfo.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/user/win32/userinfo.c?rev=170455&r1=170454&r2=170455&view=diff
==============================================================================
--- apr/apr/trunk/user/win32/userinfo.c (original)
+++ apr/apr/trunk/user/win32/userinfo.c Mon May 16 14:35:45 2005
@@ -30,7 +30,7 @@
  * depends on IsValidSid(), which internally we better test long
  * before we get here!
  */
-void get_sid_string(char *buf, int blen, apr_uid_t id)
+void get_sid_string(char *buf, apr_size_t blen, apr_uid_t id)
 {
     PSID_IDENTIFIER_AUTHORITY psia;
     DWORD nsa;
@@ -88,15 +88,14 @@
 
         strcpy(regkey, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\"
                        "ProfileList\\");
-        keylen = strlen(regkey);
+        keylen = (DWORD)strlen(regkey);
         get_sid_string(regkey + keylen, sizeof(regkey) - keylen, uid);
     }
     else {
         strcpy(regkey, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\"
                        "ProfileList\\");
-        keylen = strlen(regkey);
+        keylen = (DWORD)strlen(regkey);
         apr_cpystrn(regkey + keylen, username, sizeof(regkey) - keylen);
-
     }
 
     if ((rv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, regkey, 0, 
@@ -106,7 +105,6 @@
 #if APR_HAS_UNICODE_FS
     IF_WIN_OS_IS_UNICODE
     {
-
         keylen = sizeof(regkey);
         rv = RegQueryValueExW(key, L"ProfileImagePath", NULL, &type,
                                    (void*)regkey, &keylen);



Mime
View raw message