Re: [RFC 0/2] refactor relative_path in path.c

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

 



Jiang Xin <worldhello.net@xxxxxxxxx> writes:

> These two patches enhance relative_path() in path.c, so that function
> relative_path() will return real relative path, not a path strip off
> the prefix.
>
> The 2nd patch is a bit aggressive, it refactor all related functions,
> remove unnecessary arguments: len and/or prefix_len.

I did not particularly find the second one "aggressive"; it would
have been much more pleasant to review if the "drop unused 'len'"
part were made into a separate patch [3/2] as a follow-up, though.

It is a bit sad that relative_path() in [1/2] uses a single static
and fixed sized buffer.  How is the new implementation making sure
the expanded result does not overflow the buf[]?
--
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]