simplified wifi_essid by removing one malloc()
This commit is contained in:
parent
58c1631235
commit
85db24fef0
|
@ -672,11 +672,7 @@ wifi_perc(const char *wificard)
|
||||||
char *
|
char *
|
||||||
wifi_essid(const char *wificard)
|
wifi_essid(const char *wificard)
|
||||||
{
|
{
|
||||||
char *id = malloc(IW_ESSID_MAX_SIZE+1);
|
char id[IW_ESSID_MAX_SIZE+1];
|
||||||
if (id == NULL) {
|
|
||||||
fprintf(stderr, "Cannot get ESSID.");
|
|
||||||
return smprintf("n/a");
|
|
||||||
}
|
|
||||||
int sockfd;
|
int sockfd;
|
||||||
struct iwreq wreq;
|
struct iwreq wreq;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue