qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch
Date: Thu, 13 Nov 2014 08:57:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 11/12/2014 11:48 AM, Gary Hook wrote:
>> The function uses a ternary return value (<, >, == 0) defined as an
>> int. The code in in this function uses int64_t types to collect
>> ftell() return values and use their difference as the return
>> value. Unfortunately, narrowing of integer types results in the
>> disposal of the left-most bits that won't fit in the target
>> type. Here, for values larger than 2GB, the resulting value will be
>> randomly negative or positive, based on total number of blocks. The
>> patch ensures that only +1, -1, or 0 are returned to properly report
>> status.
>> 
>
> Please wrap commit messages at around 70 characters ('git log' likes to
> indent, and people still like to use 80-column windows to read 'git log').

The true reason for limiting commit message width is not humoring
curmudgeons insisting on antiquated terminal widths, it's us antiquated
human beings: we tend to have trouble following long lines with our eyes
(I sure do).  Typographic manuals suggest to limit columns to roughly 60
characters for exactly that reason[*].  70 is already a compromise
between legibility and "writability".

[...]

[*] https://en.wikipedia.org/wiki/Column_(typography)#Typographic_style



reply via email to

[Prev in Thread] Current Thread [Next in Thread]