Skip to content

Commit

Permalink
ext4: use swap() in memswap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and Theodore Ts'o committed Jun 13, 2015
1 parent bdf9683 commit 4b7e2db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/ext4/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 4b7e2db

Please sign in to comment.