Author: rmessiant
Date: Tue Dec 21 00:41:52 2010
New Revision: 50076
URL:
http://svn.reactos.org/svn/reactos?rev=50076&view=rev
Log:
[CLASSPNP]
- Use correct type in sizeof expression (CID 1646 and 10401).
- Simplify signature define (CID 3653 and 3654).
- Remove funky 0xFF characters.
Modified:
trunk/reactos/drivers/storage/classpnp/dictlib.c
Modified: trunk/reactos/drivers/storage/classpnp/dictlib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/classpnp/d…
==============================================================================
--- trunk/reactos/drivers/storage/classpnp/dictlib.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/classpnp/dictlib.c [iso-8859-1] Tue Dec 21 00:41:52
2010
@@ -26,30 +26,27 @@
#include <ntddk.h>
#include <classpnp.h>
-#define DICTIONARY_SIGNATURE (((ULONG)'dict' << 32) + 'sig ')
-
-struct _DICTIONARY_HEADER {
+#define DICTIONARY_SIGNATURE 'dsig'
+
+typedef struct _DICTIONARY_HEADER {
struct _DICTIONARY_HEADER* Next;
ULONGLONG Key;
UCHAR Data[0];
-};
-
-struct _DICTIONARY_HEADER;
-typedef struct _DICTIONARY_HEADER DICTIONARY_HEADER, *PDICTIONARY_HEADER;
-
-
+} DICTIONARY_HEADER, *PDICTIONARY_HEADER;
+
+
VOID
InitializeDictionary(
IN PDICTIONARY Dictionary
)
{
- RtlZeroMemory(Dictionary, sizeof(Dictionary));
+ RtlZeroMemory(Dictionary, sizeof(DICTIONARY));
Dictionary->Signature = DICTIONARY_SIGNATURE;
KeInitializeSpinLock(&Dictionary->SpinLock);
return;
}
-
+
BOOLEAN
TestDictionarySignature(
IN PDICTIONARY Dictionary
@@ -136,7 +133,7 @@
return status;
}
-
+
PVOID
GetDictionaryEntry(
IN PDICTIONARY Dictionary,
@@ -168,7 +165,7 @@
return data;
}
-
+
VOID
FreeDictionaryEntry(
IN PDICTIONARY Dictionary,