Browse Source

Remove NULL-checks before free() and a few related dead assignments.

ok and valuable input from millert@
OPENBSD_5_9
mmcc 9 years ago
parent
commit
7766921240
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      src/lib/libc/stdlib/ecvt.c

+ 3
- 5
src/lib/libc/stdlib/ecvt.c View File

@ -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> * 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 (""); return ("");
} }
if (s) {
free(s);
s = NULL;
}
free(s);
s = NULL;
if (ndigit < 0) if (ndigit < 0)
siz = -ndigit + 1; siz = -ndigit + 1;


Loading…
Cancel
Save