]> git.proxmox.com Git - mirror_qemu.git/commit - util/cutils.c
util/cutils: Rewrite documentation of qemu_strtol() & friends
authorMarkus Armbruster <armbru@redhat.com>
Tue, 21 Feb 2017 20:13:49 +0000 (21:13 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 23 Feb 2017 19:35:35 +0000 (20:35 +0100)
commit4295f879becfbbb9f4330489311586b96915d920
treeda2387727671f0c36aed92ae1262f8e380b08982
parentbc7c08a2c375acb7ae4d433054415588b176d34c
util/cutils: Rewrite documentation of qemu_strtol() & friends

Fixes the following documentation bugs:

* Fails to document that null @nptr is safe.

* Fails to document that we return -EINVAL when no conversion could be
  performed (commit 47d4be1).

* Confuses long long with int64_t, and unsigned long long with
  uint64_t.

* Claims the unsigned conversions can underflow.  They can't.

While there, mark problematic assumptions that int64_t is long long,
and uint64_t is unsigned long long with FIXME comments.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <1487708048-2131-6-git-send-email-armbru@redhat.com>
util/cutils.c