[libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0

Eric Blake eblake at redhat.com
Mon Mar 22 16:00:22 UTC 2010


On 03/20/2010 11:14 AM, Matthias Bolte wrote:
>    if test "$verbose" = "0" ; then
>      mod=`eval "expr \( $counter + 1 \) % 40"`
> -    for i in `seq $mod 40`
> -    do
> -      echo -n " "
> -    done
> +    if test "$mod" != "0" -a "$mod" != "1" ; then

test cond1 -a cond2 is not portable.  Use test cond1 && test cond2.

> +      for i in `seq $mod 40`
> +      do
> +        echo -n " "

echo -n is not portable (although you didn't introduce its use).  Use
printf ' ' instead.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100322/30050543/attachment-0001.sig>


More information about the libvir-list mailing list