summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2015-06-13 03:46:33 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2015-06-13 03:46:33 (GMT)
commit4b7e2db5c08ca3d9f3b75b2a46f53c358ea55540 (patch)
treeeb3f74b6484c35628fdf6422736e3c599e244011 /fs/ext4
parentbdf96838aea6a265f2ae6cbcfb12a778c84a0b8e (diff)
downloadlinux-4b7e2db5c08ca3d9f3b75b2a46f53c358ea55540.tar.xz
ext4: use swap() in memswap()
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ioctl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7ce8582..cb84512 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++;
}