diff options
author | 2015-12-28 22:08:18 +0000 | |
---|---|---|
committer | 2015-12-28 22:08:18 +0000 | |
commit | b4c66e9d35799de272ab90c8189d8cc311f97053 (patch) | |
tree | 553ba46476200501cc8855419b9aaf42b39d3ef8 /lib/libc/stdlib/ecvt.c | |
parent | Build most of games/ with -Werror-implicit-function-declaration. (diff) | |
download | wireguard-openbsd-b4c66e9d35799de272ab90c8189d8cc311f97053.tar.xz wireguard-openbsd-b4c66e9d35799de272ab90c8189d8cc311f97053.zip |
Remove NULL-checks before free() and a few related dead assignments.
ok and valuable input from millert@
Diffstat (limited to 'lib/libc/stdlib/ecvt.c')
-rw-r--r-- | lib/libc/stdlib/ecvt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/stdlib/ecvt.c b/lib/libc/stdlib/ecvt.c index a0bbbec0737..dfcf45fe6c5 100644 --- a/lib/libc/stdlib/ecvt.c +++ b/lib/libc/stdlib/ecvt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecvt.c,v 1.9 2015/08/20 21:49:29 deraadt Exp $ */ +/* $OpenBSD: ecvt.c,v 1.10 2015/12/28 22:08:18 mmcc Exp $ */ /* * Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com> @@ -40,10 +40,8 @@ __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) return (""); } - if (s) { - free(s); - s = NULL; - } + free(s); + s = NULL; if (ndigit < 0) siz = -ndigit + 1; |