Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-26 Thread WANG Chao
On 08/26/13 at 02:22pm, Zbigniew Jędrzejewski-Szmek wrote: > On Mon, Aug 26, 2013 at 01:15:12PM +0800, WANG Chao wrote: > > > > +static inline char *endswith(const char *s, const char *postfix) { > > > > +size_t sl = strlen(s); > > > > +size_t pl = strlen(postfix); > > > > + > > > >

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-26 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Aug 26, 2013 at 01:15:12PM +0800, WANG Chao wrote: > > > +static inline char *endswith(const char *s, const char *postfix) { > > > +size_t sl = strlen(s); > > > +size_t pl = strlen(postfix); > > > + > > > +if (sl > pl && strncmp(s + sl -pl, postfix, pl) == 0) > > > +

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-25 Thread WANG Chao
On 08/23/13 at 05:10pm, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Aug 23, 2013 at 03:36:51PM +0800, WANG Chao wrote: > > --- > > src/shared/util.c | 21 - > > src/shared/util.h | 9 - > > 2 files changed, 8 insertions(+), 22 deletions(-) > > > > diff --git a/src/sh

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-23 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Aug 23, 2013 at 03:36:51PM +0800, WANG Chao wrote: > --- > src/shared/util.c | 21 - > src/shared/util.h | 9 - > 2 files changed, 8 insertions(+), 22 deletions(-) > > diff --git a/src/shared/util.c b/src/shared/util.c > index 1dde8af..3a22000 100644 > --- a/s

[systemd-devel] [PATCH] inline static endswith()

2013-08-23 Thread WANG Chao
--- src/shared/util.c | 21 - src/shared/util.h | 9 - 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index 1dde8af..3a22000 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -107,27 +107,6 @@ bool streq_pt