Make sure all loci are properly initialized before first use.
Clean up semantics of initializers. Each locus type can be initialized either statically (by assigning the MU_LOCUS_*_INITIALIZER macro), or dynamically (by calling mu_locus_*_init function). Whatever method is used, it is important that it be initialized prior to using any other mu_locus_* function. * include/mailutils/locus.h (mu_locus_point_init): Takes single argument. Returns nothing. (mu_locus_range_init): New proto. * libmailutils/locus/locus.c (mu_locus_point_init): Rewrite. (mu_locus_range_init): New function. * libmailutils/cfg/parser.y (mu_cfg_alloc_node): Initialize locus. * libmailutils/tests/logstr.c: Fix printf argyment types. * libmu_sieve/extensions/moderator.c (moderator_filter_message): Initialize locus. * libmu_sieve/sieve-gram.y (node_alloc): Likewise. * mu/libexec/logger.c (parse_locus_point, set_locus): Likewise.
Showing
7 changed files
with
29 additions
and
26 deletions
-
Please register or sign in to post a comment