> len = snprintf(fname, 99, "%s", buf);
> - fname[len-1] = '\0';
> I just deleted that "really, really" NUL-termination line because
> it was based on a misunderstanding of snprintf()'s postcondition.
Are you sure this code can be simple deleted? It does not only
terminate the string but
len = snprintf(fname, 99, %s, buf);
- fname[len-1] = '\0';
I just deleted that really, really NUL-termination line because
it was based on a misunderstanding of snprintf()'s postcondition.
Are you sure this code can be simple deleted? It does not only
terminate the string but deletes the
2 matches
Mail list logo