* srv.h, srv.c (getsrv): Use unsigned char rather than char. Noted by
authorDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Mar 2003 02:28:02 +0000 (02:28 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sat, 15 Mar 2003 02:28:02 +0000 (02:28 +0000)
Stefan Bellon.

util/srv.c
util/srv.h

index 8fc0ca0..9e9c7b2 100644 (file)
@@ -32,6 +32,8 @@
 #include "types.h"
 #include "srv.h"
 
+/* Not every installation has gotten around to supporting SRVs
+   yet... */
 #ifndef T_SRV
 #define T_SRV 33
 #endif
@@ -50,9 +52,9 @@ static int priosort(const void *a,const void *b)
 int
 getsrv(const char *name,struct srventry **list)
 {
-  char answer[PACKETSZ];
+  unsigned char answer[PACKETSZ];
   int r,srvcount=0;
-  char *pt,*emsg;
+  unsigned char *pt,*emsg;
   u16 count,dlen;
 
   *list=NULL;
index 518151f..6dbb200 100644 (file)
 
 struct srventry
 {
-  uint16_t priority;
-  uint16_t weight;
-  uint16_t port;
+  u16 priority;
+  u16 weight;
+  u16 port;
   int run_count;
-  char target[MAXDNAME];
+  unsigned char target[MAXDNAME];
 };
 
 int getsrv(const char *name,struct srventry **list);