mbox series

[v2,0/4] qemu-ga: Fix some potential issues find by coverity

Message ID 20241011031937.92216-1-demeng@redhat.com (mailing list archive)
Headers show
Series qemu-ga: Fix some potential issues find by coverity | expand

Message

Dehan Meng Oct. 11, 2024, 3:19 a.m. UTC
v2:
Split v1 up to separate commits for each logically independent change

Dehan Meng (4):
  sscanf return values are checked to ensure correct parsing.
  Proper initialization of n to 0 for getline to function correctly.
  Avoiding freeing line prematurely. It's now only freed at the end of
    the function.
  For correcting code style: Variable declarations moved to the
    beginning of blocks Followed the coding style of using snake_case
    for variable names. And merged redundant route and networkroute
    variables.

Signed-off-by: Dehan Meng <demeng@redhat.com>

 qga/commands-linux.c | 128 ++++++++++++++++++++-----------------------
 1 file changed, 59 insertions(+), 69 deletions(-)

Comments

Konstantin Kostiuk Oct. 11, 2024, 4:12 p.m. UTC | #1
On Fri, Oct 11, 2024 at 6:19 AM Dehan Meng <demeng@redhat.com> wrote:

> v2:
> Split v1 up to separate commits for each logically independent change
>
> Dehan Meng (4):
>   sscanf return values are checked to ensure correct parsing.
>   Proper initialization of n to 0 for getline to function correctly.
>   Avoiding freeing line prematurely. It's now only freed at the end of
>     the function.
>   For correcting code style: Variable declarations moved to the
>     beginning of blocks Followed the coding style of using snake_case
>     for variable names. And merged redundant route and networkroute
>     variables.
>
>
First of all, don't use so long commit title. You can add more info in the
commit
message if needed. Commits 3 and 4 have very long titles.

Do not set . at the end of the commit title.

As in git, we do not see cover-messages, please add `qemu-ga:` suffix for
each commit

Best Regards,
Konstantin Kostiuk.


> Signed-off-by: Dehan Meng <demeng@redhat.com>
>
>  qga/commands-linux.c | 128 ++++++++++++++++++++-----------------------
>  1 file changed, 59 insertions(+), 69 deletions(-)
>
> --
> 2.40.1
>
>