style fixes. no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36099 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia
2010-04-08 21:29:25 +00:00
parent 9f568b889d
commit d2a0e98609
+6 -9
View File
@@ -73,18 +73,17 @@ get_string(const char* val, const char* sep, u_int8_t* buf, int* lenp)
| tohex((u_char) val[1]); | tohex((u_char) val[1]);
#undef tohex #undef tohex
val += 2; val += 2;
} else { } else
*p++ = *val++; *p++ = *val++;
} }
}
len = p - buf; len = p - buf;
/* The string "-" is treated as the empty string. */ /* The string "-" is treated as the empty string. */
if (!hexstr && len == 1 && buf[0] == '-') { if (!hexstr && len == 1 && buf[0] == '-') {
len = 0; len = 0;
memset(buf, 0, *lenp); memset(buf, 0, *lenp);
} else if (len < *lenp) { } else if (len < *lenp)
memset(p, 0, *lenp - len); memset(p, 0, *lenp - len);
}
*lenp = len; *lenp = len;
return val; return val;
} }
@@ -189,8 +188,8 @@ getid(int s, const char* dev, int ix, void* data, size_t len, int* plen,
{ {
struct ieee80211req ireq; struct ieee80211req ireq;
(void) memset(&ireq, 0, sizeof(ireq)); (void)memset(&ireq, 0, sizeof(ireq));
(void) strncpy(ireq.i_name, dev, sizeof(ireq.i_name)); (void)strncpy(ireq.i_name, dev, sizeof(ireq.i_name));
ireq.i_type = (!mesh) ? IEEE80211_IOC_SSID : IEEE80211_IOC_MESH_ID; ireq.i_type = (!mesh) ? IEEE80211_IOC_SSID : IEEE80211_IOC_MESH_ID;
ireq.i_val = ix; ireq.i_val = ix;
ireq.i_data = data; ireq.i_data = data;
@@ -253,10 +252,8 @@ show_status(const char* dev, int s)
print_string(data, len); print_string(data, len);
} }
} }
} else { } else
print_string(data, len); print_string(data, len);
}
} }