diff options
Diffstat (limited to 'src/pq/pq.c')
-rw-r--r-- | src/pq/pq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pq/pq.c b/src/pq/pq.c index c8deb8193..aa852902a 100644 --- a/src/pq/pq.c +++ b/src/pq/pq.c @@ -47,11 +47,11 @@ GNUNET_PQ_exec_prepared (struct GNUNET_PQ_Context *db, /* new scope to allow stack allocation without alloca */ { /* Scratch buffer for temporary storage */ - void *scratch[len]; + void *scratch[GNUNET_NZL (len)]; /* Parameter array we are building for the query */ - void *param_values[len]; - int param_lengths[len]; - int param_formats[len]; + void *param_values[GNUNET_NZL (len)]; + int param_lengths[GNUNET_NZL (len)]; + int param_formats[GNUNET_NZL (len)]; unsigned int off; /* How many entries in the scratch buffer are in use? */ unsigned int soff; @@ -178,7 +178,7 @@ GNUNET_PQ_extract_result (PGresult *result, *spec->result_size = spec->dst_size; } return GNUNET_OK; -cleanup: + cleanup: for (unsigned int j = 0; j < i; j++) if (NULL != rs[j].cleaner) rs[j].cleaner (rs[j].cls, |