summaryrefslogtreecommitdiffstats
path: root/mime-node.c
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2019-05-30 21:18:53 -0400
committerDavid Bremner <david@tethera.net>2019-05-31 07:55:46 -0300
commitd439e4b5d1715b96baba5e0fa5b1b81e9746a94c (patch)
treef0d4c927fe98e9870e05f4b2a8c3b5554a568ed4 /mime-node.c
parent2c1e5c186ee36fb215d3f312f9801884f4720d8f (diff)
mime-node: be clearer about decryption
Part 0 of a multipart/encrypted object is GMIME_MULTIPART_ENCRYPTED_VERSION; part 1 is GMIME_MULTIPART_ENCRYPTED_CONTENT. Using the name for what we want describes our intent more clearly than using a magic number in the code. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Diffstat (limited to 'mime-node.c')
-rw-r--r--mime-node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mime-node.c b/mime-node.c
index 3492bcd0..a93cbb31 100644
--- a/mime-node.c
+++ b/mime-node.c
@@ -339,7 +339,7 @@ mime_node_child (mime_node_t *parent, int child)
return NULL;
if (GMIME_IS_MULTIPART (parent->part)) {
- if (child == 1 && parent->decrypted_child)
+ if (child == GMIME_MULTIPART_ENCRYPTED_CONTENT && parent->decrypted_child)
sub = parent->decrypted_child;
else
sub = g_mime_multipart_get_part