services: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2c03e0c67d
commit
82c8c88b95
|
@ -664,7 +664,7 @@ static LPWSTR service_get_pipe_name(void)
|
||||||
{
|
{
|
||||||
static const WCHAR format[] = { '\\','\\','.','\\','p','i','p','e','\\',
|
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};
|
'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;
|
static DWORD service_current = 0;
|
||||||
DWORD len, value = -1;
|
DWORD len, value = -1;
|
||||||
LONG ret;
|
LONG ret;
|
||||||
|
@ -776,7 +776,7 @@ static DWORD add_winedevice_service(const struct service_entry *service, WCHAR *
|
||||||
struct service_entry **entry)
|
struct service_entry **entry)
|
||||||
{
|
{
|
||||||
static const WCHAR format[] = {'W','i','n','e','d','e','v','i','c','e','%','u',0};
|
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;
|
static DWORD current = 0;
|
||||||
struct scmdatabase *db = service->db;
|
struct scmdatabase *db = service->db;
|
||||||
DWORD err;
|
DWORD err;
|
||||||
|
|
Loading…
Reference in New Issue