s3/lib: don't rely on implicit int return type