]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak some var types to silence warnings.
authorMichael Jerris <mike@jerris.com>
Mon, 16 Apr 2007 13:33:45 +0000 (13:33 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 16 Apr 2007 13:33:45 +0000 (13:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4941 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/libdingaling/src/libdingaling.c
libs/libdingaling/src/libdingaling.h

index 0e2ab66df6a0dff9ede24ddc7d9368e1ced78e09..af74b1649a3c7b4c37f1c973a4ada1375be32c4b 100644 (file)
@@ -733,7 +733,7 @@ static ldl_avatar_t *ldl_get_avatar(ldl_handle_t *handle, char *path, char *from
        assert(ap != NULL);
        memset(ap, 0, sizeof(*ap));
        ldl_random_string(hash, sizeof(hash) -1, NULL);
-       sha1_hash(ap->hash, hash, strlen(hash));
+       sha1_hash(ap->hash, hash, (unsigned)strlen(hash));
        ap->path = strdup(path);
 
        key = ldl_handle_strdup(handle, from);
@@ -1051,7 +1051,7 @@ static int on_stream_component(ldl_handle_t *handle, int type, iks *node)
                        char handshake[512] = "";
 
                        snprintf(secret, sizeof(secret), "%s%s", pak->id, handle->password);
-                       sha1_hash(hash, secret, strlen(secret));
+                       sha1_hash(hash, secret, (unsigned)strlen(secret));
                        snprintf(handshake, sizeof(handshake), "<handshake>%s</handshake>", hash);
                        iks_send_raw(handle->parser, handshake);
                        handle->state = CS_START;
@@ -1862,10 +1862,8 @@ char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, un
        iks *pres, *msg;
        char *lid = NULL, *low_id = NULL;
        struct ldl_buffer buffer;
-       time_t started;
-       unsigned int elapsed;
+       time_t started, elapsed, next = 0;
        char *notice = "Call Me!";
-       int next = 0;
        
        buffer.buf = buf;
        buffer.len = len;
index 0de2f9408070f6bc3f53971b74a9942b8c3a68cd..cf513cac1eb6c0e0c5355cf54b0400b10cf42d33 100644 (file)
@@ -191,13 +191,15 @@ static inline int ldl_jid_domcmp(char *id_a, char *id_b)
 {
     char *id_a_host, *id_b_host, *id_a_r, *id_b_r;
 
-       if ((id_a_host = strchr(id_a, '@'))) {
+       id_a_host = strchr(id_a, '@');
+       if (id_a_host) {
                id_a_host++;
        } else {
                id_a_host = id_a;
        }
 
-       if ((id_b_host = strchr(id_b, '@'))) {
+       id_b_host = strchr(id_b, '@');
+       if (id_b_host) {
                id_b_host++;
        } else {
                id_b_host = id_b;
@@ -206,13 +208,15 @@ static inline int ldl_jid_domcmp(char *id_a, char *id_b)
     if (id_a_host && id_b_host) {
         size_t id_a_len = 0, id_b_len = 0, len = 0;
 
-        if ((id_a_r = strchr(id_a_host, '/'))) {
+        id_a_r = strchr(id_a_host, '/');
+               if (id_a_r) {
             id_a_len = id_a_r - id_a_host;
         } else {
             id_a_len = strlen(id_a_host);
         }
 
-        if ((id_b_r = strchr(id_b_host, '/'))) {
+        id_b_r = strchr(id_b_host, '/');
+               if (id_b_r) {
             id_b_len = id_b_r - id_b_host;
         } else {
             id_b_len = strlen(id_b_host);