Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 266581 | Differences between
and this patch

Collapse All | Expand All

(-)lib/util.c.ori (-4 / +4 lines)
Lines 755-761 Link Here
755
755
756
    PROF_stop(xstrdup);
756
    PROF_stop(xstrdup);
757
757
758
    return p;
758
    return (char *)p;
759
}
759
}
760
760
761
/*
761
/*
Lines 765-771 Link Here
765
xstrndup(const char *s, size_t n)
765
xstrndup(const char *s, size_t n)
766
{
766
{
767
    size_t sz;
767
    size_t sz;
768
    void *p;
768
    char *p;
769
    PROF_start(xstrndup);
769
    PROF_start(xstrndup);
770
    assert(s != NULL);
770
    assert(s != NULL);
771
    assert(n);
771
    assert(n);
Lines 774-780 Link Here
774
    if (sz > n)
774
    if (sz > n)
775
        sz = n;
775
        sz = n;
776
776
777
    p = xstrncpy(xmalloc(sz), s, sz);
777
    p = xstrncpy((char *)xmalloc(sz), s, sz);
778
778
779
    PROF_stop(xstrndup);
779
    PROF_stop(xstrndup);
780
780
Lines 923-929 Link Here
923
xint64toa(int64_t num)
923
xint64toa(int64_t num)
924
{
924
{
925
    static char buf[24];	/* 2^64 = 18446744073709551616 */
925
    static char buf[24];	/* 2^64 = 18446744073709551616 */
926
    snprintf(buf, sizeof(buf), "%" PRId64, num);
926
    snprintf(buf, sizeof(buf), "%" PRId64, (long long int)num);
927
    return buf;
927
    return buf;
928
}
928
}
929
929

Return to bug 266581