summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fputwc.c
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2016-01-26 07:58:35 +0000
committerreyk <reyk@openbsd.org>2016-01-26 07:58:35 +0000
commite7d3405c174ea7227d9cc787159ec249c549f2bf (patch)
tree564fb8b3e0b6c9f30ffd90b8fed8b0206b5ce12b /lib/libc/stdio/fputwc.c
parentThe division "res->size /= 1024 / 1024" is a no-op: 1024 / 1024 is (diff)
downloadwireguard-openbsd-e7d3405c174ea7227d9cc787159ec249c549f2bf.tar.xz
wireguard-openbsd-e7d3405c174ea7227d9cc787159ec249c549f2bf.zip
lseek() + write() can be replaced by a slightly shorter ftruncate()
call. Note that using ftruncate() to extend a file is not portable (POSIX allows either zero-filling until the given size is reached, or alternatively erroring out), but that shouldn't be a proble as vmm(4) isn't cross-platform either. unlink() the image file when extending it fails for consistency with the other error case (the file can't be created). From Martin Natano OK mlarkin@
Diffstat (limited to 'lib/libc/stdio/fputwc.c')
0 files changed, 0 insertions, 0 deletions