summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2020-10-01 14:02:43 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2020-10-01 14:02:43 (GMT)
commitb9f3a3d90f09668bb6c131f94bcd4c91e83a44b1 (patch) (side-by-side diff)
tree64b60a2dc4862188fb97459209ff5a2705e8f882
parent7de713903958175e87c1f7c4967ef449ed749e7e (diff)
downloadmailutils-b9f3a3d90f09668bb6c131f94bcd4c91e83a44b1.tar.gz
mailutils-b9f3a3d90f09668bb6c131f94bcd4c91e83a44b1.tar.bz2
Bugfix
* libmailutils/base/amd.c (amd_msg_lookup): Always store the index of the memory slot, as described in the comment. This was broken in 1274d937 in a fit of overcorrectness.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libmailutils/base/amd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c
index b1a428e..8a7ee9b 100644
--- a/libmailutils/base/amd.c
+++ b/libmailutils/base/amd.c
@@ -318,8 +318,7 @@ amd_msg_lookup (struct _amd_data *amd, struct _amd_message *msg,
}
rc = amd_msg_bsearch (amd, 0, amd->msg_count - 1, msg, &i);
- if (rc == 0)
- *pret = i + 1;
+ *pret = i + 1;
return rc;
}

Return to:

Send suggestions and report system problems to the System administrator.