@@ -446,8 +446,6 @@ static const struct table_data table_patch_data[] = {
446446 { p_name6 , p_data6 , sizeof p_data6 }
447447};
448448
449- #define NUM_PATCH_TABLES (sizeof table_patch_data/sizeof table_patch_data[0])
450-
451449static const WCHAR t1_name0 [] = { 0x4840 , 0x430f , 0x422f , 0 }; /* File */
452450static const WCHAR t1_name1 [] = { 0x4840 , 0x3f3f , 0x4577 , 0x446c , 0x3b6a , 0x45e4 , 0x4824 , 0 }; /* _StringData */
453451static const WCHAR t1_name2 [] = { 0x4840 , 0x3f3f , 0x4577 , 0x446c , 0x3e6a , 0x44b2 , 0x482f , 0 }; /* _StringPool */
@@ -519,8 +517,6 @@ static const struct table_data table_transform1_data[] = {
519517 { t1_name3 , t1_data3 , sizeof t1_data3 }
520518};
521519
522- #define NUM_TRANSFORM1_TABLES (sizeof table_transform1_data/sizeof table_transform1_data[0])
523-
524520static const WCHAR t2_name0 [] = { 0x4840 , 0x430f , 0x422f , 0 }; /* File */
525521static const WCHAR t2_name1 [] = { 0x4840 , 0x4216 , 0x4327 , 0x4824 , 0 }; /* Media */
526522static const WCHAR t2_name2 [] = { 0x4840 , 0x3b3f , 0x43f2 , 0x4438 , 0x45b1 , 0 }; /* _Columns */
@@ -644,8 +640,6 @@ static const struct table_data table_transform2_data[] = {
644640 { t2_name9 , t2_data9 , sizeof t2_data9 }
645641};
646642
647- #define NUM_TRANSFORM2_TABLES (sizeof table_transform2_data/sizeof table_transform2_data[0])
648-
649643static void write_tables ( IStorage * stg , const struct table_data * tables , UINT num_tables )
650644{
651645 IStream * stm ;
@@ -692,15 +686,15 @@ static void create_patch( const char *filename )
692686 r = IStorage_SetClass ( stg , & CLSID_MsiPatch );
693687 ok ( r == S_OK , "failed to set storage type 0x%08x\n" , r );
694688
695- write_tables ( stg , table_patch_data , NUM_PATCH_TABLES );
689+ write_tables ( stg , table_patch_data , ARRAY_SIZE ( table_patch_data ) );
696690
697691 r = IStorage_CreateStorage ( stg , p_name7 , mode , 0 , 0 , & stg1 );
698692 ok ( r == S_OK , "failed to create substorage 0x%08x\n" , r );
699693
700694 r = IStorage_SetClass ( stg1 , & CLSID_MsiTransform );
701695 ok ( r == S_OK , "failed to set storage type 0x%08x\n" , r );
702696
703- write_tables ( stg1 , table_transform1_data , NUM_TRANSFORM1_TABLES );
697+ write_tables ( stg1 , table_transform1_data , ARRAY_SIZE ( table_transform1_data ) );
704698 IStorage_Release ( stg1 );
705699
706700 r = IStorage_CreateStorage ( stg , p_name8 , mode , 0 , 0 , & stg2 );
@@ -709,7 +703,7 @@ static void create_patch( const char *filename )
709703 r = IStorage_SetClass ( stg2 , & CLSID_MsiTransform );
710704 ok ( r == S_OK , "failed to set storage type 0x%08x\n" , r );
711705
712- write_tables ( stg2 , table_transform2_data , NUM_TRANSFORM2_TABLES );
706+ write_tables ( stg2 , table_transform2_data , ARRAY_SIZE ( table_transform2_data ) );
713707 IStorage_Release ( stg2 );
714708 IStorage_Release ( stg );
715709}
0 commit comments