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: Markus Armbruster
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] cmd: Fix potential NULL pointer dereference
Date: Mon, 31 Oct 2011 07:27:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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.

[More of the same...]



reply via email to

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