/* only one? */
sm->subscriptions = NULL;
} else {
- if (sm->subscriptions == s) {
+ if (sm->subscriptions == s)
sm->subscriptions = s->next;
- }
s->next->prev = s->prev;
s->prev->next = s->next;
}
if (*ip_addr_text == NULL || *mac_addr_text == NULL)
goto fail;
- if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
+ sock = socket(AF_INET, SOCK_DGRAM, 0);
+ if (sock < 0)
goto fail;
os_strncpy(req.ifr_name, net_if, sizeof(req.ifr_name));
*/
if (connect(e->sd, (struct sockaddr *) &e->addr->saddr,
sizeof(e->addr->saddr))) {
- if (errno == EINPROGRESS) {
- } else {
+ if (errno != EINPROGRESS) {
event_retry(e, 1);
return -1;
}
int nerrors = 0;
sm->event_send_all_queued = 0;
- if ((s = sm->subscriptions) == NULL)
+ s = sm->subscriptions;
+ if (s == NULL)
return;
do {
if (s->addr_list == NULL) {
if (end1 || end2 || c1 != c2)
break;
}
- return (end1 && end2); /* reached end of both words? */
+ return end1 && end2; /* reached end of both words? */
}
wpa_printf(MSG_DEBUG, "WPS UPnP: M-SEARCH stop");
if (a->next == a) {
sm->msearch_replies = NULL;
- } else {
- if (sm->msearch_replies == a) {
+ } else {
+ if (sm->msearch_replies == a)
sm->msearch_replies = a->next;
- }
a->next->prev = a->prev;
a->prev->next = a->next;
}
if (!os_strncasecmp(tagname, match, match_len) &&
*tag != '/' &&
(tagname[match_len] == '>' ||
- !isgraph(tagname[match_len]) )) {
+ !isgraph(tagname[match_len]))) {
break;
}
}