A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
On some systems, sqrt(int) is not defined properly. On others its just implemented...
[simgrid.git]
/
src
/
mc
/
mc_unw_vmread.cpp
diff --git
a/src/mc/mc_unw_vmread.cpp
b/src/mc/mc_unw_vmread.cpp
index
3f37e2a
..
1e7674c
100644
(file)
--- a/
src/mc/mc_unw_vmread.cpp
+++ b/
src/mc/mc_unw_vmread.cpp
@@
-78,16
+78,16
@@
static int access_mem(const unw_addr_space_t as,
if (fd < 0)
return - UNW_EINVAL;
while (1) {
if (fd < 0)
return - UNW_EINVAL;
while (1) {
- ssize_t
s
= pread(fd, buf, count, off);
- if (
s
== 0) {
+ ssize_t
nread
= pread(fd, buf, count, off);
+ if (
nread
== 0) {
close(fd);
return - UNW_EINVAL;
}
close(fd);
return - UNW_EINVAL;
}
- if (
s
== -1)
+ if (
nread
== -1)
break;
break;
- count -=
s
;
- buf +=
s
;
- off +=
s
;
+ count -=
nread
;
+ buf +=
nread
;
+ off +=
nread
;
if (count == 0) {
close(fd);
return 0;
if (count == 0) {
close(fd);
return 0;