[systemd-devel] [PATCH] config_parse_exec_mount_flags: get rid of unnecessary copy

Maciej Wereski m.wereski at partner.samsung.com
Fri Feb 13 00:49:46 PST 2015


Dnia środa, 11 lutego 2015 13:08:26 Lennart Poettering pisze:

> This optimization is not valid.
> 
> If 'word' is set to "sh", then l will be 2, and strneq(word, "shared",
> 2) is true, but we don't actually want to allow such abbreviations!
> 
> Lennart

True, I can use strlen("shared" ) then as a n value in strneq. Or please at 
least change that:

-                else if (streq(word, "private"))
+               else if (streq(t, "private"))

regards,
-- 
Maciej Wereski
Samsung R&D Institute Poland
Samsung Electronics
m.wereski at partner.samsung.com


More information about the systemd-devel mailing list