diff options
Diffstat (limited to 'gl/stat-w32.c')
| -rw-r--r-- | gl/stat-w32.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gl/stat-w32.c b/gl/stat-w32.c index 8da8fe5c..583ef09b 100644 --- a/gl/stat-w32.c +++ b/gl/stat-w32.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Core of implementation of fstat and stat for native Windows. | 1 | /* Core of implementation of fstat and stat for native Windows. |
| 2 | Copyright (C) 2017-2025 Free Software Foundation, Inc. | 2 | Copyright (C) 2017-2026 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is free software: you can redistribute it and/or modify | 4 | This file is free software: you can redistribute it and/or modify |
| 5 | it under the terms of the GNU Lesser General Public License as | 5 | it under the terms of the GNU Lesser General Public License as |
| @@ -112,11 +112,11 @@ initialize (void) | |||
| 112 | struct timespec | 112 | struct timespec |
| 113 | _gl_convert_FILETIME_to_timespec (const FILETIME *ft) | 113 | _gl_convert_FILETIME_to_timespec (const FILETIME *ft) |
| 114 | { | 114 | { |
| 115 | struct timespec result; | ||
| 116 | /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ | 115 | /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */ |
| 117 | unsigned long long since_1601 = | 116 | unsigned long long since_1601 = |
| 118 | ((unsigned long long) ft->dwHighDateTime << 32) | 117 | ((unsigned long long) ft->dwHighDateTime << 32) |
| 119 | | (unsigned long long) ft->dwLowDateTime; | 118 | | (unsigned long long) ft->dwLowDateTime; |
| 119 | struct timespec result; | ||
| 120 | if (since_1601 == 0) | 120 | if (since_1601 == 0) |
| 121 | { | 121 | { |
| 122 | result.tv_sec = 0; | 122 | result.tv_sec = 0; |
| @@ -289,8 +289,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) | |||
| 289 | && (path = fpath, 1))) | 289 | && (path = fpath, 1))) |
| 290 | { | 290 | { |
| 291 | const char *last_dot = NULL; | 291 | const char *last_dot = NULL; |
| 292 | const char *p; | 292 | for (const char *p = path; *p != '\0'; p++) |
| 293 | for (p = path; *p != '\0'; p++) | ||
| 294 | if (*p == '.') | 293 | if (*p == '.') |
| 295 | last_dot = p; | 294 | last_dot = p; |
| 296 | if (last_dot != NULL) | 295 | if (last_dot != NULL) |
