Michael Stefaniuc : services: Use the ARRAY_SIZE() macro.

Alexandre Julliard julliard at winehq.org
Mon Nov 19 15:59:37 CST 2018


Module: wine
Branch: master
Commit: 82c8c88b95e420b1e4b406786b63c7ad769bbe00
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=82c8c88b95e420b1e4b406786b63c7ad769bbe00

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Fri Nov 16 21:50:39 2018 +0100

services: Use the ARRAY_SIZE() macro.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/services/services.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/services/services.c b/programs/services/services.c
index 1973d27..3de46bd 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -664,7 +664,7 @@ static LPWSTR service_get_pipe_name(void)
 {
     static const WCHAR format[] = { '\\','\\','.','\\','p','i','p','e','\\',
         'n','e','t','\\','N','t','C','o','n','t','r','o','l','P','i','p','e','%','u',0};
-    static WCHAR name[sizeof(format)/sizeof(WCHAR) + 10]; /* strlenW("4294967295") */
+    static WCHAR name[ARRAY_SIZE(format) + 10]; /* strlenW("4294967295") */
     static DWORD service_current = 0;
     DWORD len, value = -1;
     LONG ret;
@@ -776,7 +776,7 @@ static DWORD add_winedevice_service(const struct service_entry *service, WCHAR *
                                     struct service_entry **entry)
 {
     static const WCHAR format[] = {'W','i','n','e','d','e','v','i','c','e','%','u',0};
-    static WCHAR name[sizeof(format)/sizeof(WCHAR) + 10]; /* strlenW("4294967295") */
+    static WCHAR name[ARRAY_SIZE(format) + 10]; /* strlenW("4294967295") */
     static DWORD current = 0;
     struct scmdatabase *db = service->db;
     DWORD err;




More information about the wine-cvs mailing list