[Bug 495564] Review Request: libguestfs - Access and modify virtual machine disk images
bugzilla at redhat.com
bugzilla at redhat.com
Wed May 6 12:13:13 UTC 2009
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=495564
--- Comment #12 from Jim Meyering <meyering at redhat.com> 2009-05-06 08:13:12 EDT ---
Please use an unsigned type for length-only variables like "len" here:
This is partly stylistic, and partly to keep reviewers from wondering
if they can be negative. Added bonus, use a wider type like
size_t and you don't have to worry about overflow if there's
ever an input of 2^32 bytes or longer.
guestfs__receive_file_sync (guestfs_h *g, const char *filename)
{
void *buf;
int fd, r, len;
fd = open (filename, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY, 0666);
if (fd == -1) {
perrorf (g, "open: %s", filename);
goto cancel;
}
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Fedora-package-review
mailing list