]> arthur.barton.de Git - netatalk.git/commitdiff
Warning fixes.
authorsrittau <srittau>
Fri, 8 Feb 2002 00:05:45 +0000 (00:05 +0000)
committersrittau <srittau>
Fri, 8 Feb 2002 00:05:45 +0000 (00:05 +0000)
libatalk/netddp/netddp_sendto.c

index 070d4ea54c7be0e81ce29004b19524ac161b6a7b..e5872862875aac98d07ae9fa6d8c98563295c9c6 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: netddp_sendto.c,v 1.3.2.1 2001-11-25 21:36:58 srittau Exp $
+ * $Id: netddp_sendto.c,v 1.3.2.2 2002-02-08 00:05:45 srittau Exp $
  *
  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
  * Copyright (c) 1990,1991 Regents of The University of Michigan.
@@ -39,7 +39,7 @@ static int _netddp_sendto_dummy;
 #endif /* ! MAX */
 
 #ifdef MACOSX_SERVER
-int netddp_sendto(int fd, void *buf, int buflen, unsigned int dummy, 
+int netddp_sendto(int fd, void *buf, size_t buflen, unsigned int dummy, 
                  const struct sockaddr *addr, unsigned int addrlen)
 {
     ssize_t i;
@@ -56,7 +56,7 @@ int netddp_sendto(int fd, void *buf, int buflen, unsigned int dummy,
       return -1;
 
     memset(&ddphdr, 0, sizeof(ddphdr));
-    ddphdr.deh_len = htons(sizeof(ddphdr) + buflen);
+    ddphdr.deh_len = htons(sizeof(ddphdr) + (u_int16_t) buflen);
     ddphdr.deh_dnet = sat->sat_addr.s_net;
     ddphdr.deh_dnode = sat->sat_addr.s_node;
     ddphdr.deh_dport = sat->sat_port;