|
From: <sv...@va...> - 2008-05-22 14:30:30
|
Author: bart
Date: 2008-05-22 15:30:33 +0100 (Thu, 22 May 2008)
New Revision: 8118
Log:
Don't complain when attempting to read debug information from a file with zero length.
Modified:
branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c
Modified: branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c 2008-05-22 14:26:00 UTC (rev 8117)
+++ branches/CROSS_COMPILATION/coregrind/m_debuginfo/debuginfo.c 2008-05-22 14:30:33 UTC (rev 8118)
@@ -550,7 +550,9 @@
nread = VG_(read)( fd.res, buf1k, sizeof(buf1k) );
VG_(close)( fd.res );
- if (nread <= 0) {
+ if (nread == 0)
+ return;
+ if (nread < 0) {
DebugInfo fake_di;
VG_(memset)(&fake_di, 0, sizeof(fake_di));
fake_di.filename = filename;
|