moving development to master for a while since there is no need for branching yet #8
12
src/main.c
12
src/main.c
@@ -80,7 +80,7 @@ void get_data_from_db(const char *query, duckdb_connection *conn, TelemetryInfo
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello from HardCompound!\n");
|
||||
printf("\nHello from HardCompound!\n");
|
||||
|
||||
if (argc < 2) {
|
||||
printf("You need to specify a duckdb file path! Terminating!\n");
|
||||
@@ -139,6 +139,16 @@ int main(int argc, char **argv) {
|
||||
LapInfo *session_data = calloc(lap_count, sizeof(LapInfo));
|
||||
double *lap_timestamps = calloc(lap_count, sizeof(double));
|
||||
|
||||
if (!session_data) {
|
||||
printf("Session data failed to allocate!");
|
||||
exit(ERR_MEMORY);
|
||||
}
|
||||
|
||||
if (!lap_timestamps) {
|
||||
printf("Lap timestaps array failed to init!");
|
||||
exit(ERR_MEMORY);
|
||||
}
|
||||
|
||||
duckdb_result lap_timestamps_res;
|
||||
if (duckdb_query(conn, "Select ts as DOUBLE from Lap\n", &lap_timestamps_res) == DuckDBError) {
|
||||
exit(ERR_QUERY);
|
||||
|
||||
Reference in New Issue
Block a user