On Wed, Aug 22, 2012 at 10:00 AM, Brandon Casey <draf...@gmail.com> wrote:
> Also, we have xstrndup.  So I think the body of your function can become
> something like:
>    if (len && dir[len-1] == '/')
>        dir = tmp_dir = xstrndup(dir, len-1);
>    retval = mkdir(dir, mode);
>    free(tmp_dir);

Actually, xmemdupz could be used in place of xstrndup since we've
already called strlen.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to