Re: Porting git to HP NonStop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 22, 2012 at 10:00 AM, Brandon Casey <drafnel@xxxxxxxxx> 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.

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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]