fdo#39440 eliminate redundant condition

addresses the following cppcheck "redundantCondition"
warning:
"Redundant condition: If n > 0, the comparison
n != -1 is always true."

Change-Id: I879b1e3a07b56560dd635a399b6079f9bd2f9590
Reviewed-on: https://gerrit.libreoffice.org/13461
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>