diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-12-02 14:38:28 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-12-04 10:20:55 +0100 |
commit | c0d2f3874207e870ffb8a181b0a49637d77e5fdc (patch) | |
tree | c594618f2392bf03450e0927d37a114803d59f6b /winsup | |
parent | 97b1f4db067cc98a0e059c3a4952a1f1f64d984e (diff) | |
download | newlib-c0d2f3874207e870ffb8a181b0a49637d77e5fdc.zip newlib-c0d2f3874207e870ffb8a181b0a49637d77e5fdc.tar.gz newlib-c0d2f3874207e870ffb8a181b0a49637d77e5fdc.tar.bz2 |
Cygwin: fallocate(2): drop useless zeroing pointer
The out pointer is only used if data_chunk_count is > 0,
so there's no reason to set it to NULL in the error case.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/fhandler/disk_file.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc index ce15e41..d08fe916 100644 --- a/winsup/cygwin/fhandler/disk_file.cc +++ b/winsup/cygwin/fhandler/disk_file.cc @@ -1319,9 +1319,7 @@ fhandler_disk_file::falloc_zero_range (int mode, off_t offset, off_t length) status = NtFsControlFile (get_handle (), NULL, NULL, NULL, &io, FSCTL_QUERY_ALLOCATED_RANGES, &inp, sizeof inp, out, 2 * NT_MAX_PATH); - if (NT_ERROR (status)) - out = NULL; - else + if (!NT_ERROR (status)) data_chunk_count = io.Information / sizeof *out; } |