break;
}
}
- GNUNET_assert (0 == fclose (fp));
+ GNUNET_assert (0 == FCLOSE (fp));
/* restore dirty flag - anything we set in the meantime
* came from disk */
cfg->dirty = dirty;
sec = cfg->sections;
while (sec != NULL)
{
- if (0 > fprintf (fp, "[%s]\n", sec->name))
+ if (0 > FPRINTF (fp, "[%s]\n", sec->name))
{
error = 1;
break;
pos[0] = '\\';
pos[1] = 'n';
}
- if (0 > fprintf (fp, "%s = %s\n", ent->key, val))
+ if (0 > FPRINTF (fp, "%s = %s\n", ent->key, val))
{
error = 1;
GNUNET_free (val);
}
if (error != 0)
break;
- if (0 > fprintf (fp, "\n"))
+ if (0 > FPRINTF (fp, "%s\n", ""))
{
error = 1;
break;
}
if (error != 0)
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fprintf", filename);
- GNUNET_assert (0 == fclose (fp));
+ GNUNET_assert (0 == FCLOSE (fp));
if (error != 0)
{
cfg->dirty = GNUNET_SYSERR; /* last write failed */
struct ConfigEntry *epos;
spos = cfg->sections;
- while ((spos != NULL) && (0 != strcmp (spos->name, section)))
+ while ((spos != NULL) && (0 != strcasecmp (spos->name, section)))
spos = spos->next;
if (spos == NULL)
spos = cfg->sections;
while (spos != NULL)
{
- if (0 == strcmp (section, spos->name))
+ if (0 == strcasecmp (section, spos->name))
{
if (prev == NULL)
cfg->sections = spos->next;