El 11/02/15 a las 14:26, Lennart Poettering escribió:
On Wed, 11.02.15 18:21, Zbigniew Jędrzejewski-Szmek (zbys...@in.waw.pl) wrote:

So, hmm, so if I got this right:

a) The good basame() is in strings.h
b) The bad basename() is in libgen.h
c) The only other call in libgen.h is dirname()

There is another problem to keep an eye on.. dirname() may modify its argument.. only the GNU basename() version never does, no such warranty exists for dirname. so dirname callers must strdup(a) just in case the library does something stupid behind our backs..

I was tempted to post a patch vanishing all uses of dirname() replacing it by dirname_malloc() ...




_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to