diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-25 13:07:38 +0100 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2025-12-25 13:07:38 +0100 |
| commit | fb948c7f23a798b0c6667003261985c667a65ed6 (patch) | |
| tree | ba939b20dcba9cc02c967e79be4abdb81b426964 /src | |
| parent | 6fd2e20feb06b7ea66a4b40cd984b1ee3f774167 (diff) | |
Actually take next_id as a pointer
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -225,7 +225,7 @@ static void canonicalize(char *out, const char *in) } /* Add a new file to the databse, prompting the user for needed information. */ -static void ftag_add_one_file(sqlite3 *db, int next_id, const char *file) +static void ftag_add_one_file(sqlite3 *db, int *next_id, const char *file) { char sql[2048]; int rc; @@ -307,7 +307,7 @@ static void ftag_add_one_file(sqlite3 *db, int next_id, const char *file) memset(sql, 0, sizeof(sql)); snprintf(sql, sizeof(sql)-1, "INSERT INTO files VALUES(%d, '%s', '%s', '%s', %ld)", - next_id, canonical_name, full_name, description, date); + *next_id, canonical_name, full_name, description, date); rc = sqlite3_exec(db, sql, NULL, NULL, NULL); sqlite3_check(rc, db); (*next_id)++; |
