fix compiler warnings (and one typo)
authorfcusack <fcusack>
Wed, 10 May 2006 19:47:13 +0000 (19:47 +0000)
committerfcusack <fcusack>
Wed, 10 May 2006 19:47:13 +0000 (19:47 +0000)
src/lib/misc.c
src/lib/rbtree.c
src/lib/valuepair.c

index 65fd654..a0b65b2 100644 (file)
@@ -522,8 +522,8 @@ const char *ip_ntoh(const lrad_ipaddr_t *src, char *dst, size_t cnt)
                 return NULL;
         }
 
-       if ((error = getnameinfo(&ss, len, dst, cnt, NULL, 0,
-                        NI_NUMERICHOST | NI_NUMERICSERV)) != 0) {
+       if ((error = getnameinfo((struct sockaddr *)&ss, len, dst, cnt, NULL, 0,
+                                NI_NUMERICHOST | NI_NUMERICSERV)) != 0) {
                librad_log("ip_ntoh: %s", gai_strerror(error));
                return NULL;
        }
index 801c0e3..f7704e4 100644 (file)
@@ -42,7 +42,7 @@ struct rbnode_t {
 };
 
 #define NIL &Sentinel           /* all leafs are sentinels */
-static const rbnode_t Sentinel = { NIL, NIL, NULL, Black, NULL};
+static rbnode_t Sentinel = { NIL, NIL, NULL, Black, NULL};
 
 struct rbtree_t {
 #ifndef NDEBUG
index 8e41a70..84881af 100644 (file)
@@ -687,7 +687,7 @@ static int gettime(const char *valstr, time_t *lvalue)
                if (f[2]) {
                  *(f[2]++) = '\0';     /* nuke it, and point to SS */
                } else {
-                 f[2] = "0";
+                 f[2] = '0';
                }
 
                tm->tm_hour = atoi(f[0]);