Merge "Slightly simplify perror()." am: 793d272b43

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2470761

Change-Id: Ia0d8b51e72423a4064c363b352bea1ae9f9a4632
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliott Hughes 2023-03-06 17:41:52 +00:00 committed by Automerger Merge Worker
commit b61fec3438

View file

@ -884,7 +884,7 @@ wint_t getwchar() {
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, ...) {