|
|
@ -86,14 +86,14 @@ int main(int argc, char **argv) |
|
|
|
fprintf(stderr, "sampler failure\n"); |
|
|
|
fprintf(stderr, "sampler failure\n"); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
} |
|
|
|
} |
|
|
|
if (imdb_write_rec(db, &rec) < 1) { |
|
|
|
if ((err = imdb_write_rec(db, &rec)) < 1) { |
|
|
|
fprintf(stderr, "%s\n", db->error); |
|
|
|
fprintf(stderr, "%s\n", imdb_error(err)); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
case del : |
|
|
|
case del : |
|
|
|
if (imdb_write_rec(db, &rec) < 1) { |
|
|
|
if ((err = imdb_write_rec(db, &rec)) < 1) { |
|
|
|
fprintf(stderr, "%s\n", db->error); |
|
|
|
fprintf(stderr, "%s\n", imdb_error(err)); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
exit(EXIT_FAILURE); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|