On Wed, Aug 21, 2013 at 8:15 PM, WANG Chao <chaow...@redhat.com> wrote:
> Take this optimized code from Lennart[1]. Now startswith is a macro using
> strncmp and should be fast enough.
>
> [1]: http://lists.freedesktop.org/archives/systemd-devel/2013-July/011860.html
> ---
>  src/shared/macro.h |  5 +++++
>  src/shared/util.c  | 17 -----------------
>  2 files changed, 5 insertions(+), 17 deletions(-)

It fails to compile, there are the prototypes in util.h still.
Also quite a few places do not include macro.h ...

I guess it's easier and cleaner anyway to use simple static inline
functions instead of defines. Patch attached.

Thanks,
Kay

Attachment: 0001-replace-startswith-loop-with-optimizable-inline-fuct.patch
Description: Binary data

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

Reply via email to