mirror of https://github.com/vitalif/GPX
C99 cross compile fixes
parent
641c7538c9
commit
1bd6c3b20b
8
gpx.c
8
gpx.c
|
@ -227,7 +227,7 @@ char *sdCardPath;
|
||||||
|
|
||||||
// cleanup code in case we encounter an error that causes the program to exit
|
// cleanup code in case we encounter an error that causes the program to exit
|
||||||
|
|
||||||
static void on_exit(void)
|
static void exit_handler(void)
|
||||||
{
|
{
|
||||||
// close open files
|
// close open files
|
||||||
if(in != stdin) {
|
if(in != stdin) {
|
||||||
|
@ -257,7 +257,7 @@ static void initialize_globals(void)
|
||||||
sdCardPath = NULL;
|
sdCardPath = NULL;
|
||||||
|
|
||||||
// register cleanup function
|
// register cleanup function
|
||||||
atexit(on_exit);
|
atexit(exit_handler);
|
||||||
|
|
||||||
command.flag = 0;
|
command.flag = 0;
|
||||||
|
|
||||||
|
@ -427,9 +427,9 @@ static size_t write_string(char *string, long length)
|
||||||
|
|
||||||
static int find_filament(char *filament_id)
|
static int find_filament(char *filament_id)
|
||||||
{
|
{
|
||||||
int index = -1;
|
int i, index = -1;
|
||||||
// a brute force search is generally fastest for low n
|
// a brute force search is generally fastest for low n
|
||||||
for(int i = 0; i < filamentLength; i++) {
|
for(i = 0; i < filamentLength; i++) {
|
||||||
if(strcmp(filament_id, filament[i].colour) == 0) {
|
if(strcmp(filament_id, filament[i].colour) == 0) {
|
||||||
index = i;
|
index = i;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue