diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-02-21 21:13:52 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-02-23 20:35:35 +0100 |
commit | 4baef2679e029c76707be1e2ed54bf3dd21693fe (patch) | |
tree | 771aaa504caaa45b5ce1b9a2e24d56ad4b4999f1 /tests/test-qemu-opts.c | |
parent | 717adf960933da0650d995f050d457063d591914 (diff) | |
download | qemu-4baef2679e029c76707be1e2ed54bf3dd21693fe.zip qemu-4baef2679e029c76707be1e2ed54bf3dd21693fe.tar.gz qemu-4baef2679e029c76707be1e2ed54bf3dd21693fe.tar.bz2 |
util/cutils: Clean up control flow around qemu_strtol() a bit
Reorder check_strtox_error() to make it obvious that we always store
through a non-null @endptr.
Transform
if (some error) {
error case ...
err = value for error case;
} else {
normal case ...
err = value for normal case;
}
return err;
to
if (some error) {
error case ...
return value for error case;
}
normal case ...
return value for normal case;
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1487708048-2131-9-git-send-email-armbru@redhat.com>
Diffstat (limited to 'tests/test-qemu-opts.c')
0 files changed, 0 insertions, 0 deletions