Home GnuPG
Diffusion GnuPG dcad99c98616

gpg: Factor some code code out of tofu.c
dcad99c98616Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

gpg: Factor some code code out of tofu.c

* g10/tofu.c (string_to_long): New.
(string_to_ulong): New.
(get_single_unsigned_long_cb): Replace strtol/strtoul by new function.
(get_single_long_cb): Ditto.
(signature_stats_collect_cb):  Ditto.
(get_policy): Ditto.
(show_statistics): Ditto.  Uese es_free instead of free.

There is one minor semantic change: We now accept "nnn.0" always. The
old code did not checked for ".0: in show_statistics.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 29 2016, 3:41 PM
Parents
rG300b227cf457: doc: Fix name of gpg's option --tofu-policy
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGdcad99c98616: gpg: Factor some code code out of tofu.c (authored by Werner Koch <wk@gnupg.org>).Apr 29 2016, 3:41 PM