qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] cmd: Fix potential NULL pointer


From: Pavel Borzenkov
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] cmd: Fix potential NULL pointer dereference
Date: Mon, 31 Oct 2011 11:18:35 +0400

On Mon, Oct 31, 2011 at 10:27 AM, Markus Armbruster <address@hidden> wrote:
> Pavel Borzenkov <address@hidden> writes:
>
>> Signed-off-by: Pavel Borzenkov <address@hidden>
>> ---
>> Note, that almost all code in the file violates CODING STYLE. The changed 
>> lines
>> are written wrt CODING STYLE (like commits 7d7d975c and c32d766a).
>>
>> ---
>>
>>  cmd.c |   11 +++--------
>>  1 files changed, 3 insertions(+), 8 deletions(-)
>>
>> diff --git a/cmd.c b/cmd.c
>> index f77897e..abcf206 100644
>> --- a/cmd.c
>> +++ b/cmd.c
>> @@ -49,7 +49,7 @@ void
>>  add_command(
>>       const cmdinfo_t *ci)
>>  {
>> -     cmdtab = realloc((void *)cmdtab, ++ncmds * sizeof(*cmdtab));
>> +    cmdtab = g_realloc((void *)cmdtab, ++ncmds * sizeof(*cmdtab));
>>       cmdtab[ncmds - 1] = *ci;
>>       qsort(cmdtab, ncmds, sizeof(*cmdtab), compare);
>>  }
>
> Inconsistent indentation.
>
> Either stick to the original indentation, or reindent the whole
> function.

I'll send second version with coding style fixes made in a separate commit.

-- 
Pavel

>
> [More of the same...]
>



reply via email to

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