if (NULL == tmpdir)
tmpdir = getenv ("TMP");
if (NULL == tmpdir)
- tmpdir = getenv ("TEMP");
+ tmpdir = getenv ("TEMP");
if (NULL == tmpdir)
tmpdir = "/tmp";
GNUNET_asprintf (&tmpl, "%s/%s%s", tmpdir, t, "XXXXXX");
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
"rename",
fil);
- GNUNET_free (target);
+ GNUNET_free (target);
}
* @return the number of bytes read on success, #GNUNET_SYSERR on failure
*/
ssize_t
-GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
+GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
void *result,
size_t len)
{
*/
ssize_t
GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle *h,
- void *result,
+ void *result,
size_t len)
{
if (NULL == h)
* @return number of bytes read, #GNUNET_SYSERR on failure
*/
ssize_t
-GNUNET_DISK_fn_read (const char *fn,
- void *result,
+GNUNET_DISK_fn_read (const char *fn,
+ void *result,
size_t len)
{
struct GNUNET_DISK_FileHandle *fh;
*/
ssize_t
GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle * h,
- const void *buffer,
+ const void *buffer,
size_t n)
{
if (NULL == h)
}
if (!S_ISDIR (istat.st_mode))
{
- LOG (GNUNET_ERROR_TYPE_WARNING,
+ LOG (GNUNET_ERROR_TYPE_WARNING,
_("Expected `%s' to be a directory!\n"),
dir_name);
GNUNET_free (dname);
* @return #GNUNET_OK on success, #GNUNET_SYSERR on error
*/
int
-GNUNET_DISK_file_copy (const char *src,
+GNUNET_DISK_file_copy (const char *src,
const char *dst)
{
char *buf;
mode = translate_unix_perms (perm);
}
- fd = open (expfn, oflags
+ fd = open (expfn, oflags
#if O_CLOEXEC
| O_CLOEXEC
#endif