chiark / gitweb /
macro: make sure ALIGN() can be calculated constant by the compiler
[elogind.git] / src / libsystemd-bus / bus-message.c
index 3081664091af23e6629793efe057f1a00c644ff1..4d4f3b5260b2b115f04c9bfd6045720fcbd49e1a 100644 (file)
@@ -265,7 +265,7 @@ int bus_message_from_malloc(
         } else
                 return -EBADMSG;
 
-        total = sizeof(struct bus_header) + ALIGN_TO(fs, 8) + bs;
+        total = sizeof(struct bus_header) + ALIGN8(fs) + bs;
         if (length != total)
                 return -EBADMSG;
 
@@ -283,7 +283,7 @@ int bus_message_from_malloc(
         m->sealed = true;
         m->header = h;
         m->fields = (uint8_t*) buffer + sizeof(struct bus_header);
-        m->body = (uint8_t*) buffer + sizeof(struct bus_header) + ALIGN_TO(fs, 8);
+        m->body = (uint8_t*) buffer + sizeof(struct bus_header) + ALIGN8(fs);
         m->fds = fds;
         m->n_fds = n_fds;