diff options
author | 2015-08-20 21:49:29 +0000 | |
---|---|---|
committer | 2015-08-20 21:49:29 +0000 | |
commit | fa713987d76a93563f4184563f8d4ffc677f4041 (patch) | |
tree | 318fa02da64cfdb6a0757a26b62181035ee81e85 /lib/libc/stdlib/ecvt.c | |
parent | remove cast of malloc(), since stdlib.h is included (diff) | |
download | wireguard-openbsd-fa713987d76a93563f4184563f8d4ffc677f4041.tar.xz wireguard-openbsd-fa713987d76a93563f4184563f8d4ffc677f4041.zip |
All these files include <stdlib.h>, so do not need to cast
malloc/calloc/realloc* returns.
Diffstat (limited to 'lib/libc/stdlib/ecvt.c')
-rw-r--r-- | lib/libc/stdlib/ecvt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/ecvt.c b/lib/libc/stdlib/ecvt.c index 4562e309e8e..a0bbbec0737 100644 --- a/lib/libc/stdlib/ecvt.c +++ b/lib/libc/stdlib/ecvt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecvt.c,v 1.8 2013/11/01 19:05:11 guenther Exp $ */ +/* $OpenBSD: ecvt.c,v 1.9 2015/08/20 21:49:29 deraadt Exp $ */ /* * Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com> @@ -55,7 +55,7 @@ __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) if (value == 0.0) { *decpt = 1 - fmode; /* 1 for 'e', 0 for 'f' */ *sign = 0; - if ((rve = s = (char *)malloc(siz)) == NULL) + if ((rve = s = malloc(siz)) == NULL) return(NULL); *rve++ = '0'; *rve = '\0'; @@ -73,7 +73,7 @@ __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) /* Make a local copy and adjust rve to be in terms of s */ if (pad && fmode) siz += *decpt; - if ((s = (char *)malloc(siz)) == NULL) { + if ((s = malloc(siz)) == NULL) { __freedtoa(p); return(NULL); } |