AmendHub

Download:

jcs

/

subtext

/

amendments

/

277

mail: constify fields


jcs made amendment 277 over 2 years ago
--- mail.c Thu Sep 15 16:03:43 2022 +++ mail.c Fri Nov 11 22:23:27 2022 @@ -33,7 +33,7 @@ #define MAIL_READ_RETURN_LIST -2 #define MAIL_READ_RETURN_FIND -3 -struct bile_object_field mail_object_fields[] = { +static const struct bile_object_field mail_object_fields[] = { { offsetof(struct mail_message, recipient_user_id), member_size(struct mail_message, recipient_user_id), -1 }, { offsetof(struct mail_message, id), @@ -55,7 +55,7 @@ struct bile_object_field mail_object_fields[] = { { offsetof(struct mail_message, parent_message_id), member_size(struct mail_message, parent_message_id), -1 }, }; -size_t nmail_object_fields = nitems(mail_object_fields); +static const size_t nmail_object_fields = nitems(mail_object_fields); void mail_free_message_strings(struct mail_message *msg); short mail_save(struct session *s, struct mail_message *msg);