]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: addition and multiplication do not commute
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 3 Dec 2015 05:27:22 +0000 (00:27 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 3 Dec 2015 14:14:01 +0000 (09:14 -0500)
src/journal/journal-send.c

index fa5dee73c31f027b58a8ac16feb9ec7482bca107..8b3a367632bc408304447c343120b36446ef42ca 100644 (file)
@@ -225,8 +225,8 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
         assert_return(iov, -EINVAL);
         assert_return(n > 0, -EINVAL);
 
-        w = alloca(sizeof(struct iovec) * n * 5 + 3);
-        l = alloca(sizeof(uint64_t) * n);
+        w = newa(struct iovec, n * 5 + 3);
+        l = newa(uint64_t, n);
 
         for (i = 0; i < n; i++) {
                 char *c, *nl;