[PATCH next 0/3] fortify: Minor changes to strlen() and strnlen()

david.laight.linux@gmail.com posted 3 patches 2 days, 12 hours ago
include/linux/fortify-string.h | 109 +++++++++++++++++----------------
lib/tests/fortify_kunit.c      |   8 +--
2 files changed, 59 insertions(+), 58 deletions(-)
[PATCH next 0/3] fortify: Minor changes to strlen() and strnlen()
Posted by david.laight.linux@gmail.com 2 days, 12 hours ago
From: David Laight <david.laight.linux@gmail.com>

Looking at the object code for strnlen() of constant strings showed that
it sometimes contained an 'impossible to reach' error message.

Simplify some bits and adjust the condition so that the compiler
optimises it away.

David Laight (3):
  fortify: replace __compiletime_lessthan() with statically_true()
  fortify: Optimise strnlen()
  fortify: Simplify strlen() logic

 include/linux/fortify-string.h | 109 +++++++++++++++++----------------
 lib/tests/fortify_kunit.c      |   8 +--
 2 files changed, 59 insertions(+), 58 deletions(-)

-- 
2.39.5