remove unneeded intermediate vars
use off_t consistently
remove check for impossible condition
make ownership of pkg->version clear