Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 545176
Collapse All | Expand All

(-)file_not_specified_in_diff (-3 / +5 lines)
Line  Link Here
Pokorny)
Pokorny)
1
--
2
tc.alloc.c | 5 ++++-
1
tc.alloc.c | 5 ++++-
3
1 file changed, 4 insertions(+), 1 deletion(-)
2
1 file changed, 4 insertions(+), 1 deletion(-)
4
-- a/tc.alloc.c
3
++ b/tc.alloc.c
Lines 348-357 calloc(size_t i, size_t j) Link Here
348
{
348
{
349
#ifndef lint
349
#ifndef lint
350
    char *cp;
350
    char *cp;
351
    volatile size_t k;
351
352
352
    i *= j;
353
    i *= j;
353
    cp = xmalloc(i);
354
    cp = xmalloc(i);
354
    memset(cp, 0, i);
355
    /* Stop gcc 5.x from optimizing malloc+memset = calloc */
356
    k = i;
357
    memset(cp, 0, k);
355
358
356
    return ((memalign_t) cp);
359
    return ((memalign_t) cp);
357
#else
360
#else

Return to bug 545176