Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ ini_t* ini_load(const char *filename) {
int n, sz;

/* Init ini struct */
ini = malloc(sizeof(*ini));
ini = (ini_t*)malloc(sizeof(*ini));
if (!ini) {
goto fail;
}
Expand All @@ -197,7 +197,7 @@ ini_t* ini_load(const char *filename) {
rewind(fp);

/* Load file content into memory, null terminate, init end var */
ini->data = malloc(sz + 1);
ini->data = (char*)malloc(sz + 1);
ini->data[sz] = '\0';
ini->end = ini->data + sz;
n = fread(ini->data, 1, sz, fp);
Expand Down Expand Up @@ -226,7 +226,7 @@ void ini_free(ini_t *ini) {


const char* ini_get(ini_t *ini, const char *section, const char *key) {
char *current_section = "";
char *current_section;
char *val;
char *p = ini->data;

Expand Down