diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-05-25 21:58:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-05-25 21:58:52 +0000 |
commit | 9bd50c74256270eca5947f09770ef8845387797e (patch) | |
tree | c5e792ad66d9bafc26c0b09ca9d058c4e7755685 /src/util/connection.c | |
parent | 0d43d44a39a7cee4bc1a84ab5eb36ac8eb05e2a2 (diff) | |
download | gnunet-9bd50c74256270eca5947f09770ef8845387797e.tar.gz gnunet-9bd50c74256270eca5947f09770ef8845387797e.zip |
fixthefix
Diffstat (limited to 'src/util/connection.c')
-rw-r--r-- | src/util/connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/connection.c b/src/util/connection.c index 09a28923e..d7f956d68 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -932,14 +932,14 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct | |||
932 | GNUNET_assert (0 < strlen (unixpath)); /* sanity check */ | 932 | GNUNET_assert (0 < strlen (unixpath)); /* sanity check */ |
933 | un = GNUNET_malloc (sizeof (struct sockaddr_un)); | 933 | un = GNUNET_malloc (sizeof (struct sockaddr_un)); |
934 | un->sun_family = AF_UNIX; | 934 | un->sun_family = AF_UNIX; |
935 | slen = strlen (unixpath) + 1; | 935 | slen = strlen (unixpath); |
936 | if (slen >= sizeof (un->sun_path)) | 936 | if (slen >= sizeof (un->sun_path)) |
937 | slen = sizeof (un->sun_path) - 1; | 937 | slen = sizeof (un->sun_path) - 1; |
938 | memcpy (un->sun_path, | 938 | memcpy (un->sun_path, |
939 | unixpath, | 939 | unixpath, |
940 | slen); | 940 | slen); |
941 | un->sun_path[slen] = '\0'; | 941 | un->sun_path[slen] = '\0'; |
942 | slen = SUN_LEN (un); | 942 | slen = sizeof (struct sockaddr_un); |
943 | #if HAVE_SOCKADDR_IN_SIN_LEN | 943 | #if HAVE_SOCKADDR_IN_SIN_LEN |
944 | un->sun_len = (u_char) slen; | 944 | un->sun_len = (u_char) slen; |
945 | #endif | 945 | #endif |