projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58c1631
)
simplified wifi_essid by removing one malloc()
author
Aaron Marcher
<info@nulltime.net>
Mon, 15 Aug 2016 14:28:02 +0000
(16:28 +0200)
committer
Aaron Marcher (drkhsh)
<info@nulltime.net>
Mon, 15 Aug 2016 14:28:02 +0000
(16:28 +0200)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index 505f25d7dab88203c36caf2505fae75e8824e246..bd1fe667d0c548e7232e2ae5b7395d1d952bec10 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-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;