summaryrefslogtreecommitdiff
blob: a1292423ce4bdac4b99c22561b63ebd2e400e99d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/shout.c b/shout.c
index 0a1bded..00bae8d 100644
--- a/shout.c
+++ b/shout.c
@@ -441,7 +441,7 @@ post_config ()
 			perror ("fopen");
 			px_shutdown (44);
 		}
-		my_snprintf (pid, BUFSIZE, "%d\n", (int) getpid ());
+		my_snprintf (pid, 30, "%d\n", (int) getpid ());
 		fputs (pid, fp);
 		fclose (fp);
 	}
diff --git a/sock.c b/sock.c
index 4a67c00..3b4e539 100644
--- a/sock.c
+++ b/sock.c
@@ -81,7 +81,7 @@ sock_connect (char *hostname, int port)
 			sock_close (sockfd);
 			return -1;
 		}
-		memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin));
+		memcpy (&server.sin_addr, &sin.sin_addr, sizeof (sin.sin_addr));
 	} else {
 		host = gethostbyname (hostname);
 		if (host == NULL) {