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:
commit
b61fec3438
1 changed files with 1 additions and 1 deletions
|
@ -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, ...) {
|
||||
|
|
Loading…
Reference in a new issue