projects
/
sort-networks.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
420e924
)
src/sn_network.c: sn_network_network_add(): Renumber stages.
author
Florian Forster
<octo@leeloo.octo.it>
Sun, 20 Feb 2011 13:42:53 +0000
(14:42 +0100)
committer
Florian Forster
<octo@leeloo.octo.it>
Sun, 20 Feb 2011 13:42:53 +0000
(14:42 +0100)
src/sn_network.c
patch
|
blob
|
history
diff --git
a/src/sn_network.c
b/src/sn_network.c
index
7fee9b5
..
98b89fa
100644
(file)
--- a/
src/sn_network.c
+++ b/
src/sn_network.c
@@
-270,6
+270,7
@@
int sn_network_network_add (sn_network_t *n, sn_network_t *other) /* {{{ */
{
int stages_num;
sn_stage_t **tmp;
+ int i;
if ((n == NULL) || (other == NULL))
return (EINVAL);
@@
-285,6
+286,9
@@
int sn_network_network_add (sn_network_t *n, sn_network_t *other) /* {{{ */
memcpy (n->stages + n->stages_num, other->stages,
sizeof (*other->stages) * other->stages_num);
+ for (i = n->stages_num; i < stages_num; i++)
+ SN_STAGE_DEPTH(n->stages[i]) = i;
+
n->stages_num = stages_num;
free (other->stages);