[Bug 2176] unchecked returned value from ftruncate

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Apr 15 16:23:25 AEST 2015


https://bugzilla.mindrot.org/show_bug.cgi?id=2176

--- Comment #1 from Darren Tucker <dtucker at zip.com.au> ---
Comment on attachment 2378
  --> https://bugzilla.mindrot.org/attachment.cgi?id=2378
sftp_unchecked_return

> 		debug("truncating at %llu", (unsigned long long)highwater);
>-		ftruncate(local_fd, highwater);
>+		if (ftruncate(local_fd, highwater) == -1) {
>+			error("Unable to truncate \"%s\"", local_path);
>+		}

Please add strerror(errno) to the error text to provide a hint about
what happened.

>-

Please remove the whitespace change.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list