commit | 793d272b43af23a3b2823815a80f7f5ce61b0344 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Mon Mar 06 17:03:39 2023 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Mon Mar 06 17:03:39 2023 +0000 |
tree | 93ef0a5a2b8c540d3b2459fc730ea917cd039a6f | |
parent | 90dd5f0fd1a9424a070a580be89ccfbb5d62f08a [diff] | |
parent | ae1c64ac92eaec24781dc6e099292ffb2d810442 [diff] |
Merge "Slightly simplify perror()."
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp index 4f12fd0..645aefa 100644 --- a/libc/stdio/stdio.cpp +++ b/libc/stdio/stdio.cpp
@@ -884,7 +884,7 @@ void perror(const char* msg) { if (msg == nullptr) msg = ""; - fprintf(stderr, "%s%s%s\n", msg, (*msg == '\0') ? "" : ": ", strerror(errno)); + fprintf(stderr, "%s%s%m\n", msg, (*msg == '\0') ? "" : ": "); } int printf(const char* fmt, ...) {