- ifile = run_for_hash(db, "delete from elfinfo where file = ?", hash);
- do {
- rc = sqlite3_step(ifile);
-#if 0
- if (rc == SQLITE_ROW) {
- int nc;
- fprintf(stderr, "delete row has %d columns: ", sqlite3_column_count(ifile));
- nc = sqlite3_column_count(ifile);
- for (i = 0; i < nc; i++) {
- char *r;
- r = sqlite3_column_text(ifile, i);
- fprintf(stderr, ", %s", r);
- }
- fprintf(stderr, "\n");
- }
-#endif
- } while (rc == SQLITE_ROW);
- if (rc != SQLITE_DONE) {
- SQLERROR(sqlite3_errmsg(db));
- sqlite3_finalize(ifile);
- fprintf(stderr, "error clearing elf info: %d\n", rc);
- return 0;
- }
- sqlite3_finalize(ifile);
- ifile = run_for_hash(db, "delete from elflibraries where file = ?", hash);
- do {
- rc = sqlite3_step(ifile);
- } while (rc == SQLITE_ROW);
- if (rc != SQLITE_DONE) {
- SQLERROR(sqlite3_errmsg(db));
- sqlite3_finalize(ifile);
- fprintf(stderr, "error clearing elf library: %d\n", rc);