This avoids the hard-coded string offsets by using strlen.

It's a bit of a strange coding style.

Mainly I was interested to see if gcc could optimize this, and
(gcc-4.9.2 / x86-64 / -O2) it did - all calls to strlen are removed
from the assembly and replaced by constants.

When I compile systemd normally, it recommends using -O0 so of course
no optimization is done and all the calls to strlen are still there.

Rich.

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

Reply via email to