xcopy: 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
8969cf98cf
commit
c99d5f3152
|
@ -84,7 +84,7 @@ static WCHAR *XCOPY_LoadMessage(UINT id) {
|
||||||
static WCHAR msg[MAXSTRING];
|
static WCHAR msg[MAXSTRING];
|
||||||
const WCHAR failedMsg[] = {'F', 'a', 'i', 'l', 'e', 'd', '!', 0};
|
const WCHAR failedMsg[] = {'F', 'a', 'i', 'l', 'e', 'd', '!', 0};
|
||||||
|
|
||||||
if (!LoadStringW(GetModuleHandleW(NULL), id, msg, sizeof(msg)/sizeof(WCHAR))) {
|
if (!LoadStringW(GetModuleHandleW(NULL), id, msg, ARRAY_SIZE(msg))) {
|
||||||
WINE_FIXME("LoadString failed with %d\n", GetLastError());
|
WINE_FIXME("LoadString failed with %d\n", GetLastError());
|
||||||
lstrcpyW(msg, failedMsg);
|
lstrcpyW(msg, failedMsg);
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ static BOOL XCOPY_ProcessExcludeFile(WCHAR* filename, WCHAR* endOfName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process line by line */
|
/* Process line by line */
|
||||||
while (fgetws(buffer, sizeof(buffer)/sizeof(WCHAR), inFile) != NULL) {
|
while (fgetws(buffer, ARRAY_SIZE(buffer), inFile) != NULL) {
|
||||||
EXCLUDELIST *thisEntry;
|
EXCLUDELIST *thisEntry;
|
||||||
int length = lstrlenW(buffer);
|
int length = lstrlenW(buffer);
|
||||||
|
|
||||||
|
@ -840,9 +840,9 @@ static int XCOPY_ParseCommandLine(WCHAR *suppliedsource,
|
||||||
/* Debug info: */
|
/* Debug info: */
|
||||||
FileTimeToSystemTime (&dateRange, &st);
|
FileTimeToSystemTime (&dateRange, &st);
|
||||||
GetDateFormatW(0, DATE_SHORTDATE, &st, NULL, datestring,
|
GetDateFormatW(0, DATE_SHORTDATE, &st, NULL, datestring,
|
||||||
sizeof(datestring)/sizeof(WCHAR));
|
ARRAY_SIZE(datestring));
|
||||||
GetTimeFormatW(0, TIME_NOSECONDS, &st,
|
GetTimeFormatW(0, TIME_NOSECONDS, &st,
|
||||||
NULL, timestring, sizeof(timestring)/sizeof(WCHAR));
|
NULL, timestring, ARRAY_SIZE(timestring));
|
||||||
|
|
||||||
WINE_TRACE("Date being used is: %s %s\n",
|
WINE_TRACE("Date being used is: %s %s\n",
|
||||||
wine_dbgstr_w(datestring), wine_dbgstr_w(timestring));
|
wine_dbgstr_w(datestring), wine_dbgstr_w(timestring));
|
||||||
|
@ -987,7 +987,7 @@ static int XCOPY_ProcessSourceParm(WCHAR *suppliedsource, WCHAR *stem,
|
||||||
lstrcpyW(spec, suppliedsource+2);
|
lstrcpyW(spec, suppliedsource+2);
|
||||||
} else {
|
} else {
|
||||||
WCHAR curdir[MAXSTRING];
|
WCHAR curdir[MAXSTRING];
|
||||||
GetCurrentDirectoryW(sizeof(curdir)/sizeof(WCHAR), curdir);
|
GetCurrentDirectoryW(ARRAY_SIZE(curdir), curdir);
|
||||||
stem[0] = curdir[0];
|
stem[0] = curdir[0];
|
||||||
stem[1] = curdir[1];
|
stem[1] = curdir[1];
|
||||||
stem[2] = 0x00;
|
stem[2] = 0x00;
|
||||||
|
|
Loading…
Reference in New Issue