File: 20-socklen_typing.diff

package info (click to toggle)
netpipes 4.2-8.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 940 kB
  • sloc: ansic: 11,895; makefile: 353
file content (29 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (5)
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
27
28
29
Description: Use an unsigned integer type.
 In order to silence compiler warnings, the integer type 'int'
 is replaced with the correct 'socklen_t' for socket manipulations.
Author: Mats Erik Andersson <debian@gisladisker.se>
Forwarded: no
Last-Update: 2010-04-02
--- netpipes-4.2.orig/encapsulate.c
+++ netpipes-4.2/encapsulate.c
@@ -182,7 +182,8 @@ static int Im_server_p(sock_fd)
      int	sock_fd;
 {
     struct sockaddr_in	me, him;
-    int	len, i;
+    socklen_t len;
+    int i;
 
     len = sizeof(me);
     getsockname(sock_fd, (struct sockaddr*)&me, &len);
--- netpipes-4.2.orig/faucet.c
+++ netpipes-4.2/faucet.c
@@ -599,7 +599,7 @@ char ** argv;
   while (running) {
 
     {
-      int	length;
+      socklen_t length;
     
       length = sizeof(saddr);