From 6fbaf672c8df5778f94e46537339391022fdf5f8 Mon Sep 17 00:00:00 2001 From: Rhys Kidd Date: Sat, 29 Apr 2017 19:39:54 +0000 Subject: [PATCH] macos: Improve consistency of VG_(printf)() usage in coregrind/m_ume/macho.c. n-i-bz. Identified in the process of reviewing a proposed fix for bz#365327. Patch from Louis Brunner. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16317 --- coregrind/m_ume/macho.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index efe0f59fe4..5871dd2207 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -138,16 +138,12 @@ open_dylinker(const HChar *filename, vki_uint8_t **out_linker_entry) res = VG_(open)(filename, VKI_O_RDONLY, 0); fd = sr_Res(res); if (sr_isError(res)) { - print("couldn't open dylinker: "); - print(filename); - print("\n"); + VG_(printf)("couldn't open dylinker: %s\n", filename); return -1; } err = VG_(fstat)(fd, &sb); if (err) { - print("couldn't stat dylinker: "); - print(filename); - print("\n"); + VG_(printf)("couldn't stat dylinker: %s\n", filename); VG_(close)(fd); return -1; } @@ -156,9 +152,7 @@ open_dylinker(const HChar *filename, vki_uint8_t **out_linker_entry) err = load_mach_file(fd, 0, filesize, MH_DYLINKER, filename, NULL, NULL, NULL, out_linker_entry, NULL); if (err) { - print("...while loading dylinker: "); - print(filename); - print("\n"); + VG_(printf)("...while loading dylinker: %s\n", filename); } VG_(close)(fd); return err; -- 2.47.2