diff options
Diffstat (limited to 'src/lib/libc/stdlib/ecvt.c')
-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 | } |