diff options
author | deraadt <> | 2015-08-20 21:49:29 +0000 |
---|---|---|
committer | deraadt <> | 2015-08-20 21:49:29 +0000 |
commit | 189f85c7c7c7892a00f683ff1b1945c1db9cbc6c (patch) | |
tree | 906afedfff26ac2d6fec9dd54aa21fad26af98bf /src/lib/libc/stdlib/ecvt.c | |
parent | e6c90f43a8799602fd3816074341117c7ab33089 (diff) | |
download | openbsd-189f85c7c7c7892a00f683ff1b1945c1db9cbc6c.tar.gz openbsd-189f85c7c7c7892a00f683ff1b1945c1db9cbc6c.tar.bz2 openbsd-189f85c7c7c7892a00f683ff1b1945c1db9cbc6c.zip |
All these files include <stdlib.h>, so do not need to cast
malloc/calloc/realloc* returns.
Diffstat (limited to '')
-rw-r--r-- | src/lib/libc/stdlib/ecvt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/ecvt.c b/src/lib/libc/stdlib/ecvt.c index 4562e309e8..a0bbbec073 100644 --- a/src/lib/libc/stdlib/ecvt.c +++ b/src/lib/libc/stdlib/ecvt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecvt.c,v 1.8 2013/11/01 19:05:11 guenther Exp $ */ | 1 | /* $OpenBSD: ecvt.c,v 1.9 2015/08/20 21:49:29 deraadt Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2002, 2006 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * 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) | |||
55 | if (value == 0.0) { | 55 | if (value == 0.0) { |
56 | *decpt = 1 - fmode; /* 1 for 'e', 0 for 'f' */ | 56 | *decpt = 1 - fmode; /* 1 for 'e', 0 for 'f' */ |
57 | *sign = 0; | 57 | *sign = 0; |
58 | if ((rve = s = (char *)malloc(siz)) == NULL) | 58 | if ((rve = s = malloc(siz)) == NULL) |
59 | return(NULL); | 59 | return(NULL); |
60 | *rve++ = '0'; | 60 | *rve++ = '0'; |
61 | *rve = '\0'; | 61 | *rve = '\0'; |
@@ -73,7 +73,7 @@ __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, int pad) | |||
73 | /* Make a local copy and adjust rve to be in terms of s */ | 73 | /* Make a local copy and adjust rve to be in terms of s */ |
74 | if (pad && fmode) | 74 | if (pad && fmode) |
75 | siz += *decpt; | 75 | siz += *decpt; |
76 | if ((s = (char *)malloc(siz)) == NULL) { | 76 | if ((s = malloc(siz)) == NULL) { |
77 | __freedtoa(p); | 77 | __freedtoa(p); |
78 | return(NULL); | 78 | return(NULL); |
79 | } | 79 | } |