Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2023-12-02 16:38:28 +0300
committerCorinna Vinschen <corinna@vinschen.de>2023-12-04 12:20:55 +0300
commitc0d2f3874207e870ffb8a181b0a49637d77e5fdc (patch)
treec594618f2392bf03450e0927d37a114803d59f6b /winsup
parent97b1f4db067cc98a0e059c3a4952a1f1f64d984e (diff)
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.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc
index ce15e41a4..d08fe9160 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;
}