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