From 960cf5737e58c03b0d29797c0d4bd3461f1fdeff Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 22 Sep 2011 12:12:37 +0200 Subject: misc: use %m in format string instead of %s and strerror(errno) Signed-off-by: Petr Uzel --- sys-utils/readprofile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys-utils/readprofile.c') diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c index 0e124bc71..49f0cbd6c 100644 --- a/sys-utils/readprofile.c +++ b/sys-utils/readprofile.c @@ -211,8 +211,8 @@ main(int argc, char **argv) { exit(1); } if (write(fd, &multiplier, to_write) != to_write) { - fprintf(stderr, _("readprofile: error writing %s: %s\n"), - defaultpro, strerror(errno)); + fprintf(stderr, _("readprofile: error writing %s: %m\n"), + defaultpro); exit(1); } close(fd); @@ -225,7 +225,7 @@ main(int argc, char **argv) { if (((proFd=open(proFile,O_RDONLY)) < 0) || ((int)(len=lseek(proFd,0,SEEK_END)) < 0) || (lseek(proFd,0,SEEK_SET) < 0)) { - fprintf(stderr,"%s: %s: %s\n",prgname,proFile,strerror(errno)); + fprintf(stderr,"%s: %s: %m\n", prgname, proFile); exit(1); } @@ -233,7 +233,7 @@ main(int argc, char **argv) { rc = read(proFd,buf,len); if (rc < 0 || (size_t) rc != len) { - fprintf(stderr,"%s: %s: %s\n",prgname,proFile,strerror(errno)); + fprintf(stderr,"%s: %s: %m\n", prgname, proFile); exit(1); } close(proFd); -- cgit v1.2.3-55-g7522