diff mbox

[v1,1/1] qom: Correct object_property_get_int() description

Message ID 9aab0156c2f307ece61c3d8106450d736553a0d5.1453141118.git.alistair.francis@xilinx.com
State New
Headers show

Commit Message

Alistair Francis Jan. 18, 2016, 6:42 p.m. UTC
The description of object_property_get_int() stated that on an error
it returns NULL. This is not the case and the function will return -1
if an error occurs. Update the commented documentation accordingly.

Reported-By: Christian Liebhardt <christian.liebhardt@keysight.com>
Signed-off-by: Christian Liebhardt <christian.liebhardt@keysight.com>
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
 include/qom/object.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster Jan. 19, 2016, 7:19 a.m. UTC | #1
Copying maintainer.  Always do that even for trivial patches.

Alistair Francis <alistair.francis@xilinx.com> writes:

> The description of object_property_get_int() stated that on an error
> it returns NULL. This is not the case and the function will return -1
> if an error occurs. Update the commented documentation accordingly.
>
> Reported-By: Christian Liebhardt <christian.liebhardt@keysight.com>
> Signed-off-by: Christian Liebhardt <christian.liebhardt@keysight.com>
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
>  include/qom/object.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/qom/object.h b/include/qom/object.h
> index 4509166..2848f5e 100644
> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -1107,7 +1107,7 @@ void object_property_set_int(Object *obj, int64_t value,
>   * @name: the name of the property
>   * @errp: returns an error if this function fails
>   *
> - * Returns: the value of the property, converted to an integer, or NULL if
> + * Returns: the value of the property, converted to an integer, or negative if
>   * an error occurs (including when the property value is not an integer).
>   */
>  int64_t object_property_get_int(Object *obj, const char *name,
Michael Tokarev Jan. 30, 2016, 9:35 a.m. UTC | #2
18.01.2016 21:42, Alistair Francis wrote:
> The description of object_property_get_int() stated that on an error
> it returns NULL. This is not the case and the function will return -1
> if an error occurs. Update the commented documentation accordingly.

Applied to -trivial, thanks!

/mjt
Alistair Francis Feb. 1, 2016, 11:27 p.m. UTC | #3
On Sat, Jan 30, 2016 at 1:35 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 18.01.2016 21:42, Alistair Francis wrote:
>> The description of object_property_get_int() stated that on an error
>> it returns NULL. This is not the case and the function will return -1
>> if an error occurs. Update the commented documentation accordingly.
>
> Applied to -trivial, thanks!

Thanks!

Alistair

>
> /mjt
>
diff mbox

Patch

diff --git a/include/qom/object.h b/include/qom/object.h
index 4509166..2848f5e 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -1107,7 +1107,7 @@  void object_property_set_int(Object *obj, int64_t value,
  * @name: the name of the property
  * @errp: returns an error if this function fails
  *
- * Returns: the value of the property, converted to an integer, or NULL if
+ * Returns: the value of the property, converted to an integer, or negative if
  * an error occurs (including when the property value is not an integer).
  */
 int64_t object_property_get_int(Object *obj, const char *name,