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
[sonar] The three expressions of a "for" statement should only be concerned with...
[simgrid.git]
/
src
/
simgrid
/
sg_config.cpp
diff --git
a/src/simgrid/sg_config.cpp
b/src/simgrid/sg_config.cpp
index
6e09b76
..
2341736
100644
(file)
--- a/
src/simgrid/sg_config.cpp
+++ b/
src/simgrid/sg_config.cpp
@@
-47,11
+47,10
@@
int _sg_cfg_init_status = 0;
static void sg_config_cmd_line(int *argc, char **argv)
{
bool shall_exit = false;
static void sg_config_cmd_line(int *argc, char **argv)
{
bool shall_exit = false;
- int i;
- int j;
bool parse_args = true; // Stop parsing the parameters once we found '--'
bool parse_args = true; // Stop parsing the parameters once we found '--'
- for (j = i = 1; i < *argc; i++) {
+ int j = 1;
+ for (int i = j; i < *argc; i++) {
if (not strcmp("--", argv[i])) {
parse_args = false;
// Remove that '--' from the arguments
if (not strcmp("--", argv[i])) {
parse_args = false;
// Remove that '--' from the arguments