> The patches touch the interface of many functions I added one external function: find_in_path_var. The other changes are all static and local.
> It seems essentially equivalent to just calling > find_in_path (list->word->word, path_value ("BASH_SOURCE_PATH", 1), > FS_READABLE); It is. I'm just very averse to chaining functions like that in C since you can't write f(g(x)) without worrying about freeing the value returned by g. For that reason I think this is better: find_in_path_var (list->word->word, "BASH_SOURCE_PATH", FS_READABLE); Also, find_in_path is itself just a wrapper for a static function, just like find_in_path_var. I followed the same approach. > The cases where path_value() returns NULL or an empty string would be > anyway handled by find_in_path() With find_in_path_var there's no need to even consider that. The knowledge of those cases has been captured by the function. There's no need to explicitly use path_value either. > I doubt it's worth adding those changes in > `findcmd.c'. So are the changes in [PATCH v2 2/8]. You don't think they improve the code? -- Matheus