Skip to content

Commit

Permalink
src/winusb: util_shift_array: bail out for apparent design issues
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁 <[email protected]>
  • Loading branch information
brlin-tw committed Jun 7, 2017
1 parent b18c908 commit 2ba0a7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/winusb
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,8 @@ util_shift_array(){
local -n array_ref="${1}"

if [ "${#array_ref[@]}" -eq 0 ]; then
printf "ERROR: array is empty!\n" 1>&2
return 1
printf "%s: FATAL: array is empty!\n" "${FUNCNAME[0]}" 1>&2
exit 1
fi

# Unset the 1st element
Expand Down

0 comments on commit 2ba0a7b

Please sign in to comment.