Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:buschmann23:cyrus:3.0
cyrus-imapd
cyrus-imapd-3.0.17-fix-assert.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cyrus-imapd-3.0.17-fix-assert.patch of Package cyrus-imapd
From: Matthias Fehring <buschmann23@opensuse.org> Date: 2022-09-15 14:03:00 +0200 Subject: Fix assert definition References: gh#cyrusimap/cyrus-imapd#4123 Upstream: merged Based on https://github.com/cyrusimap/cyrus-imapd/pull/4140 --- imap/mailbox.c | 2 +- imap/message.c | 14 +++++++------- lib/assert.h | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) --- a/imap/mailbox.c 2022-02-02 02:53:08.000000000 +0100 +++ b/imap/mailbox.c 2022-09-15 13:39:54.216519274 +0200 @@ -3514,7 +3514,7 @@ EXPORTED int mailbox_append_index_record assert(mailbox_index_islocked(mailbox, 1)); /* Append MUST be a higher UID than any we've yet seen */ - assert(record->uid > mailbox->i.last_uid) + assert(record->uid > mailbox->i.last_uid); /* Append MUST have a message with data */ assert(record->size); --- a/imap/message.c 2022-02-02 02:53:08.000000000 +0100 +++ b/imap/message.c 2022-09-15 13:43:14.115582946 +0200 @@ -4283,7 +4283,7 @@ EXPORTED int message_get_mailinglist(mes EXPORTED const struct index_record *msg_record(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return &m->record; } @@ -4297,7 +4297,7 @@ EXPORTED int message_get_size(message_t EXPORTED uint32_t msg_size(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return m->record.size; } @@ -4311,7 +4311,7 @@ EXPORTED int message_get_uid(message_t * EXPORTED uint32_t msg_uid(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return m->record.uid; } @@ -4325,7 +4325,7 @@ EXPORTED int message_get_cid(message_t * EXPORTED conversation_id_t msg_cid(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return m->record.cid; } @@ -4339,7 +4339,7 @@ EXPORTED int message_get_modseq(message_ EXPORTED modseq_t msg_modseq(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return m->record.modseq; } @@ -4353,7 +4353,7 @@ EXPORTED int message_get_msgno(message_t EXPORTED int msg_msgno(const message_t *m) { - assert(!message_need(m, M_INDEX)) + assert(!message_need(m, M_INDEX)); return m->msgno; } @@ -4367,7 +4367,7 @@ EXPORTED int message_get_guid(message_t EXPORTED const struct message_guid *msg_guid(const message_t *m) { - assert(!message_need(m, M_RECORD)) + assert(!message_need(m, M_RECORD)); return &m->record.guid; } --- a/lib/assert.h 2022-01-24 00:38:00.000000000 +0100 +++ b/lib/assert.h 2022-09-15 13:50:42.932479521 +0200 @@ -43,11 +43,11 @@ #ifndef INCLUDED_ASSERT_H #define INCLUDED_ASSERT_H -#ifdef __STDC__ -#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);} void assertionfailed(const char *file, int line, const char *expr); -#else -#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);} -#endif + +#define assert(expr) \ + ((expr) \ + ? (void)(0) \ + : assertionfailed(__FILE__, __LINE__, #expr)) #endif /* INCLUDED_ASSERT_H */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor