Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mailbox_get_xconvemodseq() is never called with NULL for *modseqp #4621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions imap/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -4387,9 +4387,6 @@ EXPORTED int mailbox_get_xconvmodseq(struct mailbox *mailbox, modseq_t *modseqp)
conv_status_t status = CONV_STATUS_INIT;
int r;

if (modseqp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just remove the test here, or put an assert(modseqp)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changeset removes the test.

*modseqp = 0;

struct conversations_state *cstate = mailbox_get_cstate(mailbox);
if (!cstate) return 0;

Expand Down
2 changes: 1 addition & 1 deletion imap/mailbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ extern int mailbox_cid_rename(struct mailbox *mailbox,
conversation_id_t from_cid,
conversation_id_t to_cid);
extern int mailbox_add_conversations(struct mailbox *mailbox, int silent);
extern int mailbox_get_xconvmodseq(struct mailbox *mailbox, modseq_t *);
__attribute__((nonnull)) int mailbox_get_xconvmodseq(struct mailbox *mailbox, modseq_t *);
extern int mailbox_update_xconvmodseq(struct mailbox *mailbox, modseq_t, int force);
#define mailbox_has_conversations(m) mailbox_has_conversations_full(m, 0)
extern int mailbox_has_conversations_full(struct mailbox *mailbox, int allow_deleted);
Expand Down