• Travis Cross's avatar
    Refactor to avoid warning about realloc usage · 164fa133
    Travis Cross 提交于
    Clang's static analyzer noticed the result of realloc was being
    assigned to a pointer of a different type than was used to calculate
    the new size.  We can make things simpler and more idiomatic here by
    using the correct pointer type and letting C's pointer arithmetic
    automatically handle some multiplication.
    
    We also use the distributive property here to simplify the calculation
    for memset.
    164fa133
switch_stfu.c 25.5 KB