From b1e7e8ba2f6705efee8633c4a63513686308c891 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 26 Jun 2023 17:19:45 -0600 Subject: [PATCH] [algs] Fix return of hb_memset() --- src/hb-algs.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index c8a3a216d..374965d56 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -984,7 +984,7 @@ static inline void * hb_memset (void *s, int c, unsigned int n) { /* It's illegal to pass NULL to memset(), even if n is zero. */ - if (unlikely (!n)) return 0; + if (unlikely (!n)) return s; return memset (s, c, n); }