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
Declare local variables inside the if statement.
[simgrid.git]
/
src
/
mc
/
remote
/
RemoteProcess.cpp
diff --git
a/src/mc/remote/RemoteProcess.cpp
b/src/mc/remote/RemoteProcess.cpp
index
dda2716
..
3923fd8
100644
(file)
--- a/
src/mc/remote/RemoteProcess.cpp
+++ b/
src/mc/remote/RemoteProcess.cpp
@@
-319,8
+319,7
@@
std::string RemoteProcess::read_string(RemotePtr<char> address) const
continue;
xbt_assert(c > 0, "Could not read string from remote process");
- const void* p = memchr(res.data() + off, '\0', c);
- if (p)
+ if (const void* p = memchr(res.data() + off, '\0', c))
return std::string(res.data());
off += c;