[LTP] [PATCH 2/3] network/stress: add ipsec lib

Hangbin Liu haliu@redhat.com
Fri Mar 11 06:34:14 CET 2016


On Wed, Mar 09, 2016 at 03:42:06PM +0300, Alexey Kodanev wrote:
> >+# c2x: convert charactor to hex
> >+c2x()
> >+{
> >+	for str in $@; do
> >+		for (( i=0; i<${#str}; i++ )); do
> 
> Not portable "for (());", could be changed to "for i in $(seq 0 ${#str});
> do.

Hi Alexey,

Since we need to use the number from 0 to str_len - 1. I think it's also
not portable if we use like "for i in $(seq 0 $((${#str} - 1))); do". So I
will keep the format. Please tell me if you have any other suggestion.

Thanks
Hangbin


More information about the ltp mailing list