[PATCH 5/7] qga/vss: Use MAX_PATH instead of PATH_MAX

Kostiantyn Kostiuk posted 7 patches 6 days, 21 hours ago
Maintainers: Kostiantyn Kostiuk <kkostiuk@redhat.com>, Michael Roth <michael.roth@amd.com>
[PATCH 5/7] qga/vss: Use MAX_PATH instead of PATH_MAX
Posted by Kostiantyn Kostiuk 6 days, 21 hours ago
MAX_PATH defined in windows.h
This is more correct way for Windows.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
 qga/vss-win32/requester.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 626d6ab1ff..493ecd5717 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -444,7 +444,7 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
                 hr = vss_ctx.pVssbc->AddToSnapshotSet(short_volume_name,
                                                       g_gProviderId, &pid);
                 if (FAILED(hr)) {
-                    WCHAR volume_path_name[PATH_MAX];
+                    WCHAR volume_path_name[MAX_PATH];
                     if (GetVolumePathNamesForVolumeNameW(
                             short_volume_name, volume_path_name,
                             sizeof(volume_path_name), NULL) &&
-- 
2.52.0