]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
fs/binfmt_misc.c: simplify entry_status()
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 16 Apr 2015 19:44:56 +0000 (12:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:03:59 +0000 (09:03 -0400)
commit6ceafb880c218a14e0cf8d08499138a1a9775fb2
tree19131ae8840571d482040ba266c95b3862628a4a
parente0df7e1faebad9a7ac0931d03f86fcd5c0d1896e
fs/binfmt_misc.c: simplify entry_status()

sprintf() reliably returns the number of characters printed, so we don't
need to ask strlen() where we are.  Also replace calling sprintf("%02x")
in a loop with the much simpler bin2hex().

[akpm@linux-foundation.org: it's odd to include kernel.h after everything else]
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_misc.c