Michael Stefaniuc : dmstyle: Remove a not very useful macro.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 7 08:11:58 CDT 2015
Module: wine
Branch: master
Commit: 4f2a92328e512b904c76a56cfc977f6ceeb5451f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f2a92328e512b904c76a56cfc977f6ceeb5451f
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Tue Jul 7 10:12:22 2015 +0200
dmstyle: Remove a not very useful macro.
The memory is already zeroed on allocation.
---
dlls/dmstyle/dmutils.h | 6 ------
dlls/dmstyle/style.c | 4 ++--
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/dmstyle/dmutils.h b/dlls/dmstyle/dmutils.h
index 9fc2904..e290287 100644
--- a/dlls/dmstyle/dmutils.h
+++ b/dlls/dmstyle/dmutils.h
@@ -49,12 +49,6 @@ typedef struct {
} guid_info;
/* used for initialising structs */
-#define DM_STRUCT_INIT(x) \
- do { \
- memset((x), 0, sizeof(*(x))); \
- (x)->dwSize = sizeof(*x); \
- } while (0)
-
#define FE(x) { x, #x }
#define GE(x) { &x, #x }
diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c
index 4e09d0a..255c96a 100644
--- a/dlls/dmstyle/style.c
+++ b/dlls/dmstyle/style.c
@@ -440,7 +440,7 @@ static HRESULT parse_part_ref_list(DMUS_PRIVATE_CHUNK *pChunk, IStream *pStm,
hr = IStream_Read (pStm, &pNewItem->part_ref, sizeof(DMUS_IO_PARTREF), NULL);
/*TRACE_(dmfile)(" - sizeof %lu\n", sizeof(DMUS_IO_PARTREF));*/
list_add_tail (&pNewMotif->Items, &pNewItem->entry);
- DM_STRUCT_INIT(&pNewItem->desc);
+ pNewItem->desc.dwSize = sizeof(pNewItem->desc);
break;
}
case FOURCC_LIST: {
@@ -669,7 +669,7 @@ static HRESULT parse_pattern_list(IDirectMusicStyle8Impl *This, DMUS_PRIVATE_CHU
/** TODO trace pattern */
/** reset all data, as a new pattern begin */
- DM_STRUCT_INIT(&pNewMotif->desc);
+ pNewMotif->desc.dwSize = sizeof(pNewMotif->desc);
list_init (&pNewMotif->Items);
break;
}
More information about the wine-cvs
mailing list