/*
This file is part of GNUnet.
- Copyright (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009-2013 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
int ret;
s = socket (AF_UNIX, SOCK_STREAM, 0);
+ if (-1 == s)
+ {
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING,
+ "Failed to open AF_UNIX socket");
+ return;
+ }
ret = connect (s,
(struct sockaddr *) un,
sizeof (struct sockaddr_un));
#ifndef FD_COPY
-#define FD_COPY(s, d) (memcpy ((d), (s), sizeof (fd_set)))
+#define FD_COPY(s, d) do { GNUNET_memcpy ((d), (s), sizeof (fd_set)); } while (0)
#endif
return GNUNET_SYSERR;
#ifndef MINGW
desc->addr = GNUNET_malloc (address_len);
- memcpy (desc->addr, address, address_len);
+ GNUNET_memcpy (desc->addr, address, address_len);
desc->addrlen = address_len;
#endif
return GNUNET_OK;
GNUNET_array_grow (to->handles,
to->handles_size,
from->handles_pos * 2);
- memcpy (to->handles,
+ GNUNET_memcpy (to->handles,
from->handles,
from->handles_pos * sizeof (struct GNUNET_NETWORK_Handle *));
to->handles_pos = from->handles_pos;