]> git.imager.perl.org - imager.git/blobdiff - io.c
[rt #72475] make the error messages from read() match reality
[imager.git] / io.c
diff --git a/io.c b/io.c
index 82efec962b9b5e86e1cc1ae759f4c19c89feca77..4e78cd78f20b4fdbc8e9d9dbd64735610805f669 100644 (file)
--- a/io.c
+++ b/io.c
@@ -69,7 +69,12 @@ set_entry(int i, char *buf, size_t size, char *file, int line) {
   buf += UNDRRNVAL;
   malloc_pointers[i].ptr  = buf;
   malloc_pointers[i].size = size;
+#ifdef IMAGER_SNPRINTF
+  snprintf(malloc_pointers[i].comm, sizeof(malloc_pointers[i].comm), 
+          "%s (%d)", file, line);
+#else
   sprintf(malloc_pointers[i].comm,"%s (%d)", file, line);
+#endif
   return buf;
 }