diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-09-28 17:34:31 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-29 08:41:53 +0200 |
commit | 9699096f1eccd742d898f471b046181ea90dd582 (patch) | |
tree | 1b62f4c159a6ae9b90eac7d750a4833b0e30a7dc /commands/fbtest.c | |
parent | 12d74001d52911dfb96d81b774183aeaba21370c (diff) | |
download | barebox-9699096f1eccd742d898f471b046181ea90dd582.tar.gz barebox-9699096f1eccd742d898f471b046181ea90dd582.tar.xz |
treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifier
Using %pe instead of PTR_ERR has the benefit of being less verbose and
less error-prone (no negation necessary) while potentially reducing
code size. Make use of it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/fbtest.c')
-rw-r--r-- | commands/fbtest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/fbtest.c b/commands/fbtest.c index ff24a8252a..30d96f6af4 100644 --- a/commands/fbtest.c +++ b/commands/fbtest.c @@ -271,9 +271,8 @@ static int do_fbtest(int argc, char *argv[]) sc = fb_open(fbdev); if (IS_ERR(sc)) { - int ret = -PTR_ERR(sc); - printf("fb_open: %s\n", strerror(ret)); - return ret; + printf("fb_open: %pe\n", sc); + return COMMAND_ERROR; } if (!pattern_name) { |