Bug 720016 - warning when compiling the maintenance service - swprintf takes a count parameter. r=bbondy

This commit is contained in:
Robert Strong 2012-01-22 15:55:22 -08:00
Родитель 3dc16ca78c
Коммит 1a156ce3aa
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -186,9 +186,11 @@ GetBackupLogPath(LPWSTR path, LPCWSTR basePath, int logNumber)
WCHAR logName[64];
wcscpy(path, basePath);
if (logNumber <= 0) {
swprintf(logName, L"maintenanceservice.log");
swprintf(logName, sizeof(logName) / sizeof(logName[0]),
L"maintenanceservice.log");
} else {
swprintf(logName, L"maintenanceservice-%d.log", logNumber);
swprintf(logName, sizeof(logName) / sizeof(logName[0]),
L"maintenanceservice-%d.log", logNumber);
}
return PathAppendSafe(path, logName);
}