#endif
if (dotOutFile != NULL)
{
- fclose (dotOutFile);
FPRINTF (dotOutFile, "%s", "}");
+ FCLOSE (dotOutFile);
}
ok = 0;
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
}
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
ok = 0;
if (outfile != NULL)
{
FPRINTF (outfile, "%s", "}\n");
- fclose (outfile);
+ FCLOSE (outfile);
GNUNET_SCHEDULER_add_now (&finish_testing, NULL);
}
}
#endif
GNUNET_SCHEDULER_cancel (die_task);
GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
- dotOutFileFinished = fopen (dotOutFileNameFinished, "w");
+ dotOutFileFinished = FOPEN (dotOutFileNameFinished, "w");
GNUNET_free (dotOutFileNameFinished);
if (dotOutFileFinished != NULL)
{
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
}
ok = 1;
- dotOutFile = fopen (dotOutFileName, "w");
+ dotOutFile = FOPEN (dotOutFileName, "w");
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "strict graph G {\n");
if (outfile != NULL)
{
FPRINTF (outfile, "%s", "}\n");
- fclose (outfile);
+ FCLOSE (outfile);
#if DO_STATS
GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL);
#endif
#endif
GNUNET_SCHEDULER_cancel (die_task);
GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
- dotOutFileFinished = fopen (dotOutFileNameFinished, "w");
+ dotOutFileFinished = FOPEN (dotOutFileNameFinished, "w");
GNUNET_free (dotOutFileNameFinished);
if (dotOutFileFinished != NULL)
{
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
}
ok = 1;
- dotOutFile = fopen (dotOutFileName, "w");
+ dotOutFile = FOPEN (dotOutFileName, "w");
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "strict graph G {\n");
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
ok = 0;
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "}");
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
}
ok = 1;
- dotOutFile = fopen (dotOutFileName, "w");
+ dotOutFile = FOPEN (dotOutFileName, "w");
if (dotOutFile != NULL)
{
FPRINTF (dotOutFile, "%s", "strict graph G {\n");
ok = 404;
if (dotOutFile != NULL)
{
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
return;
}
ok = 707;
if (dotOutFile != NULL)
{
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
return;
}
ok = 808;
if (dotOutFile != NULL)
{
- fclose (dotOutFile);
+ FCLOSE (dotOutFile);
}
return;
}
{
mytemp = GNUNET_DISK_mktemp ("friends");
GNUNET_assert (mytemp != NULL);
- temp_friend_handle = fopen (mytemp, "wt");
+ temp_friend_handle = FOPEN (mytemp, "wt");
GNUNET_assert (temp_friend_handle != NULL);
#if OLD
conn_iter = pg->peers[pg_iter].allowed_peers_head;
&friend_file_iterator,
temp_friend_handle);
#endif
- fclose (temp_friend_handle);
+ FCLOSE (temp_friend_handle);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (pg->peers[pg_iter].daemon->cfg,
{
mytemp = GNUNET_DISK_mktemp ("blacklist");
GNUNET_assert (mytemp != NULL);
- temp_file_handle = fopen (mytemp, "wt");
+ temp_file_handle = FOPEN (mytemp, "wt");
GNUNET_assert (temp_file_handle != NULL);
temp_transports = GNUNET_strdup (transports);
#if !OLD
}
GNUNET_free (temp_transports);
- fclose (temp_file_handle);
+ FCLOSE (temp_file_handle);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (pg->peers[pg_iter].daemon->cfg,
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;
}
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 */
char *lgu;
GNUNET_snprintf (fn, sizeof (fn), "/proc/%u/maps", getpid ());
- f = fopen (fn, "r");
+ f = FOPEN (fn, "r");
if (f == NULL)
return NULL;
while (NULL != fgets (line, sizeof (line), f))
(NULL != (lgu = strstr (dir, "libgnunetutil"))))
{
lgu[0] = '\0';
- fclose (f);
+ FCLOSE (f);
return GNUNET_strdup (dir);
}
}
- fclose (f);
+ FCLOSE (f);
return NULL;
}
}
if (0 > FPRINTF (pidfd, "%u", pid))
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "fprintf", pif);
- GNUNET_break (0 == fclose (pidfd));
+ GNUNET_break (0 == FCLOSE (pidfd));
if ((user != NULL) && (0 < strlen (user)))
GNUNET_DISK_file_change_owner (pif, user);
GNUNET_free_non_null (user);
memset (block, 42, sizeof (block) / 2);
memset (&block[sizeof (block) / 2], 43, sizeof (block) / 2);
- GNUNET_assert (NULL != (f = fopen (FILENAME, "w+")));
+ GNUNET_assert (NULL != (f = FOPEN (FILENAME, "w+")));
GNUNET_break (sizeof (block) == fwrite (block, 1, sizeof (block), f));
- GNUNET_break (0 == fclose (f));
+ GNUNET_break (0 == FCLOSE (f));
ret = 1;
GNUNET_SCHEDULER_run (&file_hasher, &ret);
GNUNET_break (0 == UNLINK (FILENAME));