advapi32: Replace const pointer parameters with correct pointers to const

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Mar 3 17:46:12 CST 2007


const LPBYTE is equivalent to BYTE *const. Whereas, the relevant parameters
should be of type const BYTE *.

-- Andy.
---
Changelog:
    advapi32: Replace const pointer parameters with correct pointers to const.

diff -urN a/dlls/advapi32/crypt_lmhash.c b/dlls/advapi32/crypt_lmhash.c
--- a/dlls/advapi32/crypt_lmhash.c	2006-08-26 19:48:33.000000000 +0100
+++ b/dlls/advapi32/crypt_lmhash.c	2007-03-03 23:26:18.000000000 +0000
@@ -73,7 +73,7 @@
  *  see http://davenport.sourceforge.net/ntlm.html#theLmResponse
  *
  */
-NTSTATUS WINAPI SystemFunction008(const LPBYTE challenge, const LPBYTE hash, LPBYTE response)
+NTSTATUS WINAPI SystemFunction008(const BYTE *challenge, const BYTE *hash, LPBYTE response)
 {
     BYTE key[7*3];
 
@@ -95,7 +95,7 @@
  *
  * Seems to do the same as SystemFunction008 ...
  */
-NTSTATUS WINAPI SystemFunction009(const LPBYTE challenge, const LPBYTE hash, LPBYTE response)
+NTSTATUS WINAPI SystemFunction009(const BYTE *challenge, const BYTE *hash, LPBYTE response)
 {
     return SystemFunction008(challenge, hash, response);
 }
@@ -115,7 +115,7 @@
  *  Failure: STATUS_UNSUCCESSFUL
  *
  */
-NTSTATUS WINAPI SystemFunction001(const LPBYTE data, const LPBYTE key, LPBYTE output)
+NTSTATUS WINAPI SystemFunction001(const BYTE *data, const BYTE *key, LPBYTE output)
 {
     if (!data || !output)
         return STATUS_UNSUCCESSFUL;
@@ -138,7 +138,7 @@
  *  Failure: STATUS_UNSUCCESSFUL
  *
  */
-NTSTATUS WINAPI SystemFunction002(const LPBYTE data, const LPBYTE key, LPBYTE output)
+NTSTATUS WINAPI SystemFunction002(const BYTE *data, const BYTE *key, LPBYTE output)
 {
     if (!data || !output)
         return STATUS_UNSUCCESSFUL;
@@ -160,7 +160,7 @@
  *  Failure: STATUS_UNSUCCESSFUL
  *
  */
-NTSTATUS WINAPI SystemFunction003(const LPBYTE key, LPBYTE output)
+NTSTATUS WINAPI SystemFunction003(const BYTE *key, LPBYTE output)
 {
     if (!output)
         return STATUS_UNSUCCESSFUL;
@@ -310,7 +310,7 @@
  *  Success: STATUS_SUCCESS
  *  Failure: STATUS_UNSUCCESSFUL  if the input or output buffer is NULL
  */
-NTSTATUS WINAPI SystemFunction012(const LPBYTE in, const LPBYTE key, LPBYTE out)
+NTSTATUS WINAPI SystemFunction012(const BYTE *in, const BYTE *key, LPBYTE out)
 {
     if (!in || !out)
         return STATUS_UNSUCCESSFUL;
@@ -339,7 +339,7 @@
  *  Success: STATUS_SUCCESS
  *  Failure: STATUS_UNSUCCESSFUL  if the input or output buffer is NULL
  */
-NTSTATUS WINAPI SystemFunction013(const LPBYTE in, const LPBYTE key, LPBYTE out)
+NTSTATUS WINAPI SystemFunction013(const BYTE *in, const BYTE *key, LPBYTE out)
 {
     if (!in || !out)
         return STATUS_UNSUCCESSFUL;
@@ -362,7 +362,7 @@
  * RETURNS
  *  Success: STATUS_SUCCESS
  */
-NTSTATUS WINAPI SystemFunction024(const LPBYTE in, const LPBYTE key, LPBYTE out)
+NTSTATUS WINAPI SystemFunction024(const BYTE *in, const BYTE *key, LPBYTE out)
 {
     BYTE deskey[0x10];
 
@@ -390,7 +390,7 @@
  * RETURNS
  *  Success: STATUS_SUCCESS
  */
-NTSTATUS WINAPI SystemFunction025(const LPBYTE in, const LPBYTE key, LPBYTE out)
+NTSTATUS WINAPI SystemFunction025(const BYTE *in, const BYTE *key, LPBYTE out)
 {
     BYTE deskey[0x10];
 
diff -urN a/dlls/advapi32/tests/crypt_lmhash.c b/dlls/advapi32/tests/crypt_lmhash.c
--- a/dlls/advapi32/tests/crypt_lmhash.c	2006-07-18 11:14:37.000000000 +0100
+++ b/dlls/advapi32/tests/crypt_lmhash.c	2007-03-03 23:20:54.000000000 +0000
@@ -34,14 +34,14 @@
     unsigned char *Buffer;
 };
 
-typedef NTSTATUS (WINAPI *fnSystemFunction001)(const LPBYTE, const LPBYTE, LPBYTE);
-typedef NTSTATUS (WINAPI *fnSystemFunction002)(const LPBYTE, const LPBYTE, LPBYTE);
-typedef NTSTATUS (WINAPI *fnSystemFunction003)(const LPBYTE, LPBYTE);
+typedef NTSTATUS (WINAPI *fnSystemFunction001)(const BYTE *, const BYTE *, LPBYTE);
+typedef NTSTATUS (WINAPI *fnSystemFunction002)(const BYTE *, const BYTE *, LPBYTE);
+typedef NTSTATUS (WINAPI *fnSystemFunction003)(const BYTE *, LPBYTE);
 typedef NTSTATUS (WINAPI *fnSystemFunction004)(const struct ustring *, const struct ustring *, struct ustring *);
 typedef NTSTATUS (WINAPI *fnSystemFunction005)(const struct ustring *, const struct ustring *, struct ustring *);
 typedef VOID (WINAPI *fnSystemFunction006)( PCSTR passwd, PSTR lmhash );
-typedef NTSTATUS (WINAPI *fnSystemFunction008)(const LPBYTE, const LPBYTE, LPBYTE);
-typedef NTSTATUS (WINAPI *fnSystemFunction009)(const LPBYTE, const LPBYTE, LPBYTE);
+typedef NTSTATUS (WINAPI *fnSystemFunction008)(const BYTE *, const BYTE *, LPBYTE);
+typedef NTSTATUS (WINAPI *fnSystemFunction009)(const BYTE *, const BYTE *, LPBYTE);
 typedef int (WINAPI *descrypt)(unsigned char *, unsigned char *, unsigned char *);
 typedef NTSTATUS (WINAPI *fnSystemFunction030)(void*, void*);
 typedef NTSTATUS (WINAPI *fnSystemFunction032)(struct ustring *, struct ustring *);



More information about the wine-patches mailing list