From: Fabian Frederick Date: Sat, 13 Jun 2015 03:46:33 +0000 (-0400) Subject: ext4: use swap() in memswap() X-Git-Tag: v4.2-rc1~118^2~16 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4b7e2db5c08ca3d9f3b75b2a46f53c358ea55540;p=linux.git ext4: use swap() in memswap() Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 7ce85824211b..cb8451246b30 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -31,14 +31,11 @@ static void memswap(void *a, void *b, size_t len) { unsigned char *ap, *bp; - unsigned char tmp; ap = (unsigned char *)a; bp = (unsigned char *)b; while (len-- > 0) { - tmp = *ap; - *ap = *bp; - *bp = tmp; + swap(*ap, *bp); ap++; bp++; }