Home GnuPG
Diffusion GPGME da035768bd9a

core: Non-zero values should set _armor, _textmode, and _online.
da035768bd9aUnpublished

Unpublished Commit · Learn More

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

Description

core: Non-zero values should set _armor, _textmode, and _online.

* src/gpgme.c (gpgme_set_armor, gpgme_set_textmode,
gpgme_set_offline): Ensure that non-zero values actually set the
appropriate internal bit.

The documentation for these functions says things like "disabled if
YES is zero, and enabled otherwise", where YES is an integer.
However, if you pass an even integer, it will be aliased back to 0
because the context member variables are declared as single bits.

This should make the implementation match the documentation.

  • Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

Details

Provenance
dkgAuthored on Nov 11 2016, 12:47 AM
wernerCommitted on Nov 11 2016, 3:14 PM
Parents
rM05775b52485a: doc: Fix regression in macro handling
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rMda035768bd9a: core: Non-zero values should set _armor, _textmode, and _online. (authored by Daniel Kahn Gillmor <dkg@fifthhorseman.net>).Nov 11 2016, 3:14 PM