tweak some var types to silence warnings.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4941 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-04-16 13:33:45 +00:00
parent 527ef0f588
commit 1547637ba8
2 changed files with 11 additions and 9 deletions

View 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;

View 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);