diff mbox series

[LEDE-DEV] libopkg: Replace strerror(errno) with %m

Message ID 1514242852-5554-1-git-send-email-rosenp@gmail.com
State Changes Requested
Delegated to: John Crispin
Headers show
Series [LEDE-DEV] libopkg: Replace strerror(errno) with %m | expand

Commit Message

Rosen Penev Dec. 25, 2017, 11 p.m. UTC
Saves a few bytes. No functional difference.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 libopkg/opkg_conf.c    | 2 +-
 libopkg/opkg_message.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libopkg/opkg_conf.c b/libopkg/opkg_conf.c
index 08855eb..e4de374 100644
--- a/libopkg/opkg_conf.c
+++ b/libopkg/opkg_conf.c
@@ -450,7 +450,7 @@  static int glob_errfunc(const char *epath, int eerrno)
 		/* If leading dir does not exist, we get GLOB_NOMATCH. */
 		return 0;
 
-	opkg_msg(ERROR, "glob failed for %s: %s\n", epath, strerror(eerrno));
+	opkg_msg(ERROR, "glob failed for %s: %m\n", epath);
 	return 0;
 }
 
diff --git a/libopkg/opkg_message.h b/libopkg/opkg_message.h
index 4110ab9..441fd2d 100644
--- a/libopkg/opkg_message.h
+++ b/libopkg/opkg_message.h
@@ -42,6 +42,6 @@  void opkg_message(message_level_t level, const char *fmt, ...)
 	} while (0)
 
 #define opkg_perror(l, fmt, args...) \
-	opkg_msg(l, fmt": %s.\n", ##args, strerror(errno))
+	opkg_msg(l, fmt": %m.\n", ##args)
 
 #endif /* _OPKG_MESSAGE_H_ */