|
From: Nicholas N. <nj...@ca...> - 2003-10-30 10:34:07
|
CVS commit by nethercote:
Fix cachegrind to deal with VG_(open)() returning any negative number on error,
not just -1.
M +1 -1 cg_main.c 1.54
--- valgrind/cachegrind/cg_main.c #1.53:1.54
@@ -1620,5 +1620,5 @@ static void fprint_BBCC_table_and_calc_t
fd = VG_(open)(cachegrind_out_file, VKI_O_CREAT|VKI_O_TRUNC|VKI_O_WRONLY,
VKI_S_IRUSR|VKI_S_IWUSR);
- if (-1 == fd) {
+ if (fd < 0) {
/* If the file can't be opened for whatever reason (conflict
between multiple cachegrinded processes?), give up now. */
|