projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02c1dde
)
[multipathd] fix occasional CLI output trailing garbage
author
root
<root@potab.(none)>
Wed, 17 Aug 2005 16:16:46 +0000
(18:16 +0200)
committer
root
<root@potab.(none)>
Wed, 17 Aug 2005 16:16:46 +0000
(18:16 +0200)
caused by an off-by-one reply len calculation in show_paths()
and show_maps()
multipathd/main.c
patch
|
blob
|
history
diff --git
a/multipathd/main.c
b/multipathd/main.c
index
c47e17c
..
114ab46
100644
(file)
--- a/
multipathd/main.c
+++ b/
multipathd/main.c
@@
-717,7
+717,7
@@
show_paths (char ** r, int * len, struct paths * allpaths)
}
*r = reply;
- *len = (int)(c - reply);
+ *len = (int)(c - reply
+ 1
);
return 0;
}
@@
-761,7
+761,7
@@
show_maps (char ** r, int *len, struct paths * allpaths)
}
*r = reply;
- *len = (int)(c - reply);
+ *len = (int)(c - reply
+ 1
);
return 0;
}