]> git.ipfire.org Git - thirdparty/systemd.git/commit
coccinelle: don't run iovec-make on iovec_done{,_erase}
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 09:16:37 +0000 (11:16 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Oct 2023 09:16:37 +0000 (11:16 +0200)
commitb3bfb95178a8dce6bf3db9337bb0d3901485883b
treebd4c0b3beba4c35753a2781e8b1d76e0357442ff
parentadabcbabffbfc1f96a5e170f4a1cdc357ea15285
coccinelle: don't run iovec-make on iovec_done{,_erase}

As the result is a bit funky (but still valid), i.e.:

 static inline void iovec_done_erase(struct iovec *iovec) {
         assert(iovec);

-        iovec->iov_base = erase_and_free(iovec->iov_base);
-        iovec->iov_len = 0;
+        *iovec = IOVEC_MAKE(erase_and_free(iovec->iov_base), 0);
 }
coccinelle/iovec-make.cocci