msg = NULL;
status = dbi_conn_error(conn, &msg);
if ((status >= 0) && (msg != NULL))
- ssnprintf(buffer, buffer_size, "%s (status %i)", msg, status);
+ snprintf(buffer, buffer_size, "%s (status %i)", msg, status);
else
- ssnprintf(buffer, buffer_size, "dbi_conn_error failed with status %i",
- status);
+ snprintf(buffer, buffer_size, "dbi_conn_error failed with status %i",
+ status);
return buffer;
} /* }}} const char *cdbi_conn_error */
long long value;
value = dbi_result_get_longlong_idx(res, index);
- ssnprintf(buffer, buffer_size, "%lli", value);
+ snprintf(buffer, buffer_size, "%lli", value);
} else if (src_type == DBI_TYPE_DECIMAL) {
double value;
value = dbi_result_get_double_idx(res, index);
- ssnprintf(buffer, buffer_size, "%63.15g", value);
+ snprintf(buffer, buffer_size, "%63.15g", value);
} else if (src_type == DBI_TYPE_STRING) {
const char *value;
if (db->q_prep_areas)
for (size_t i = 0; i < db->queries_num; ++i)
udb_query_delete_preparation_area(db->q_prep_areas[i]);
- free(db->q_prep_areas);
+ sfree(db->q_prep_areas);
+ /* N.B.: db->queries references objects "owned" by the global queries
+ * variable. Free the array here, but not the content. */
+ sfree(db->queries);
sfree(db);
} /* }}} void cdbi_database_free */