From: Rhys Kidd Date: Sat, 29 Apr 2017 19:39:54 +0000 (+0000) Subject: macos: Improve consistency of VG_(printf)() usage in coregrind/m_ume/macho.c. n-i-bz. X-Git-Tag: svn/VALGRIND_3_13_0~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fbaf672c8df5778f94e46537339391022fdf5f8;p=thirdparty%2Fvalgrind.git 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 --- 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;