On Tue, Nov 11, 2014 at 19:08:25 +0000, Rory McNamara wrote:
> Surely that would cause problems based on ordering?
> For example, if name was ls, and lsplaylist comes after ls in
> mpc_table (which it does)
> when we come to the end of our for loop, lsplaylist struct would be in
> our local copy when the correct
> match is ls. Also matches would be 2, so the ternary would fail.

No, because we're still counting the number of matches and returning
NULL if there isn't exactly a single match.

> Admittedly, my implementation is dependant on shorter names being
> before longer names.

That sounds fragile.

--Ben
_______________________________________________
mpd-devel mailing list
mpd-devel@musicpd.org
http://mailman.blarg.de/listinfo/mpd-devel

Reply via email to