diff options
author | Aaron Marcher <info@nulltime.net> | 2016-08-15 16:28:02 +0200 |
---|---|---|
committer | Aaron Marcher (drkhsh) <info@nulltime.net> | 2016-08-15 16:28:02 +0200 |
commit | 85db24fef03fe611c3ac8151f9249af282ae9915 (patch) | |
tree | b6d49dcdb6a4f711e89a879044e60b44b77d98e1 | |
parent | 58c16312359d77e799416d119194055675ea11ea (diff) |
simplified wifi_essid by removing one malloc()
-rw-r--r-- | slstatus.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -672,11 +672,7 @@ wifi_perc(const char *wificard) char * wifi_essid(const char *wificard) { - char *id = malloc(IW_ESSID_MAX_SIZE+1); - if (id == NULL) { - fprintf(stderr, "Cannot get ESSID."); - return smprintf("n/a"); - } + char id[IW_ESSID_MAX_SIZE+1]; int sockfd; struct iwreq wreq; |