summaryrefslogtreecommitdiff
path: root/libc/unistd
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-20 20:39:38 +0000
commit88917b0f143e2eac468aea14338b4d9eddba389d (patch)
tree790fd49f0632b93a7ad9cd02974bff82efa60b25 /libc/unistd
parent43eb269ab1d216074e18dadc74c9671398dfe938 (diff)
replace "if (p) free(p)" by just "free(p)" - free(NULL) is safe.
Diffstat (limited to 'libc/unistd')
-rw-r--r--libc/unistd/usershell.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c
index ea4a04ba4..4a9ba0bca 100644
--- a/libc/unistd/usershell.c
+++ b/libc/unistd/usershell.c
@@ -80,13 +80,9 @@ char * getusershell(void)
static void __free_initshell_memory(void)
{
- if (shells != NULL) {
- free(shells);
- }
+ free(shells);
shells = NULL;
- if (strings != NULL) {
- free(strings);
- }
+ free(strings);
strings = NULL;
}
@@ -98,7 +94,6 @@ void endusershell(void)
void setusershell(void)
{
-
curshell = initshells();
}