Project

General

Profile

« Previous | Next » 

Revision 9080

lib/sh/util.sh: reverse(): use `i > 0` rather than `i >= 1` to match the `i < length` idiom used in forwards loops

View differences:

util.sh
90 90
reverse() # usage: array=($(reverse args...))
91 91
{
92 92
	local i
93
	for (( i=$#; i >= 1; i-- )); do printf '%q ' "${!i}"; done
93
	for (( i=$#; i > 0; i-- )); do printf '%q ' "${!i}"; done
94 94
}
95 95

  
96 96

  

Also available in: Unified diff