- dp->offsets = (long *) calloc(sizeof (long), dp->num_cards);
- if (fread(dp->offsets, sizeof(long), dp->num_cards, deckf) != dp->num_cards) {
+ dp->offsets = (off_t *) calloc(sizeof (off_t), dp->num_cards);
+ if (dp->offsets == NULL)
+ errx(1, "out of memory");
+ if (fread(dp->offsets, sizeof(off_t), dp->num_cards, deckf) !=
+ dp->num_cards) {