Re: [libvirt PATCH v2] Fix some wrong usage of ATTRIBUTE_NONNULL

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

 



On 6/6/20 12:52 PM, Bihong Yu wrote:
There are some wrong usage of ATTRIBUTE_NONNULL, which may cause the compilation fail. The
ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which declares that the
input pointer parameter of funciton should not be NULL. If we declare some input pointer
parameter of the function is ATTRIBUTE_NONNULL, the function should not redundancy check of
the pointer parameter. And the ATTRIBUTE_NONNULL can only be using to pointer.

From 01a7301d50d6c1388df80dfa9af9da2582deec82 Mon Sep 17 00:00:00 2001
From: Bihong Yu <yubihong@xxxxxxxxxx>
Date: Sat, 6 Jun 2020 18:20:16 +0800
Subject: [PATCH] bugifx: fix some wrong usage of ATTRIBUTE_NONNULL

The ATTRIBUTE_NONNULL is the define of __attribute__((__nonnull__(m))), which
declares that the input pointer parameter of funciton should not be NULL. If we
declare some input pointer parameter of the function is ATTRIBUTE_NONNULL, the
function should not redundancy check of the pointer parameter. And the
ATTRIBUTE_NONNULL can only be using to pointer.

Signed-off-by:Bihong Yu <yubihong@xxxxxxxxxx>
Reviewed-by:Chuan Zheng <zhengchuan@xxxxxxxxxx>
---
  src/libvirt_internal.h | 3 +--
  src/util/vircommand.h  | 3 +--
  2 files changed, 2 insertions(+), 4 deletions(-)


Tweaked the commit message a bit and pushed.

Congratulations on your first libvirt contribution!

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux