diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2019-08-29 11:38:50 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2019-09-01 08:38:11 -0300 |
commit | ab0ae8b1c086ca3878f16ce40cc421eeb206c79e (patch) | |
tree | 2ed00ac849133135c2d2ff262ba9a104cfad788c /mime-node.c | |
parent | 8b25643d08b9388ae9c38837a3dfd3dbc6b085cf (diff) |
util/crypto: _n_m_crypto_potential_payload returns whether part is the payload
Our _notmuch_message_crypto_potential_payload implementation could
only return a failure if bad arguments were passed to it. It is an
internal function, so if that happens it's an entirely internal bug
for notmuch.
It will be more useful for this function to return whether or not the
part is in fact a cryptographic payload, so we dispense with the
status return.
If some future change suggests adding a status return back, there are
only a handful of call sites, and no pressure to retain a stable API,
so it could be changed easily. But for now, go with the simpler
function.
We will use this return value in future patches, to make different
decisions based on whether a part is the cryptographic payload or not.
But for now, we just leave the places where it gets invoked marked
with (void) to show that the result is ignored.
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'mime-node.c')
-rw-r--r-- | mime-node.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mime-node.c b/mime-node.c index d2125f90..abb6dd84 100644 --- a/mime-node.c +++ b/mime-node.c @@ -293,8 +293,6 @@ _mime_node_create (mime_node_t *parent, GMimeObject *part, int numchild) static bool _mime_node_set_up_part (mime_node_t *node, GMimeObject *part, int numchild) { - notmuch_status_t status; - /* Deal with the different types of parts */ if (GMIME_IS_PART (part)) { node->part = part; @@ -335,9 +333,7 @@ _mime_node_set_up_part (mime_node_t *node, GMimeObject *part, int numchild) node_verify (node, part); } } else { - status = _notmuch_message_crypto_potential_payload (node->ctx->msg_crypto, part, node->parent ? node->parent->part : NULL, numchild); - if (status) - fprintf (stderr, "Warning: failed to record potential crypto payload (%s).\n", notmuch_status_to_string (status)); + (void) _notmuch_message_crypto_potential_payload (node->ctx->msg_crypto, part, node->parent ? node->parent->part : NULL, numchild); } return true; |