Some architectures really want well alingned structures.
Thanks to Jim Gifford <maillist@jg555.com> for help finding it.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
int valid;
char *linepos;
char *attr;
+ size_t padding;
int retval;
/* get all the keys */
/* grow buffer and add rule */
rule_size = sizeof(struct udev_rule) + rule->bufsize;
+ padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t);
+ dbg("add %zi padding bytes", padding);
+ rule_size += padding;
+ rule->bufsize += padding;
+
rules->buf = realloc(rules->buf, rules->bufsize + rule_size);
if (!rules->buf) {
err("realloc failed");