On 11/10/25 9:34 PM, Marco Felsch wrote:
> Signed-off-by: Marco Felsch <[email protected]>

Reviewed-by: Ahmad Fatoum <[email protected]>

I split out this patch in a series that I just sent.

Cheers,
Ahmad

> ---
>  pbl/string.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/pbl/string.c b/pbl/string.c
> index 
> 528f62ef2055aa59643e7a882b2ac1358813386d..89663fef3d6a5b0bdcbda2f3c6bc686f1ee4da71
>  100644
> --- a/pbl/string.c
> +++ b/pbl/string.c
> @@ -102,6 +102,21 @@ int strcmp(const char *cs, const char *ct)
>       return res;
>  }
>  
> +int strncmp(const char *cs, const char *ct, size_t count)
> +{
> +     register signed char __res = 0;
> +
> +     BUG_ON(!cs || !ct);
> +
> +     while (count) {
> +             if ((__res = *cs - *ct++) != 0 || !*cs++)
> +                     break;
> +             count--;
> +     }
> +
> +     return __res;
> +}
> +
>  int strcasecmp(const char *s1, const char *s2)
>  {
>       int c1, c2;
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


Reply via email to