qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Carlos L. Torres" <cltorrespr@gmail.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers
Date: Wed, 29 Jul 2015 12:49:02 -0600	[thread overview]
Message-ID: <55B9201E.3010505@redhat.com> (raw)
In-Reply-To: <cover.1437346779.git.carlos.torres@rackspace.com>

[-- Attachment #1: Type: text/plain, Size: 822 bytes --]

On 07/19/2015 05:02 PM, Carlos L. Torres wrote:
> From: "Carlos L. Torres" <carlos.torres@rackspace.com>
> 
> Introduce qemu_ wrappers for strtol/strtoul/strtoll/strtoull
> C functions, ensure that errno is checked, and if NULL is
> passed as the endptr argument, then whole string has to be
> a valid number on the given base, otherwise return appropriate
> error.
> 
> Different from the C strto*l() functions, these wrappers
> return through the 'result' out parameter.
> 
> Include unit-tests for each wrapper function.

Can you also patch scripts/check-patch.pl to forcefully warn developers
when they are introducing bogus uses of strto*l() and should be using
the sane wrappers instead?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

      parent reply	other threads:[~2015-07-29 18:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19 23:02 [Qemu-devel] [PATCH v3 0/5] cutils: Add qemu_strto*l() wrappers Carlos L. Torres
2015-07-19 23:02 ` [Qemu-devel] [PATCH v3 1/5] cutils: Add qemu_strtol() wrapper Carlos L. Torres
2015-07-19 23:02 ` [Qemu-devel] [PATCH v3 2/5] cutils: Add qemu_strtoul() wrapper Carlos L. Torres
2015-07-19 23:02 ` [Qemu-devel] [PATCH v3 3/5] cutils: Add qemu_strtoll() wrapper Carlos L. Torres
2015-07-19 23:02 ` [Qemu-devel] [PATCH v3 4/5] cutils: Add qemu_strtoull() wrapper Carlos L. Torres
2015-07-19 23:02 ` [Qemu-devel] [PATCH v3 5/5] qmp: Add example usage of strto*l() qemu wrapper Carlos L. Torres
2015-07-29 18:49 ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55B9201E.3010505@redhat.com \
    --to=eblake@redhat.com \
    --cc=cltorrespr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).