[PATCH] str: remove duplicate parameter check
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Sun Aug 29 18:07:35 BST 2021
There is no need to check the parameters of strntoken() twice.
Fixes: c7bb10cf154a ("Tidy up our string primitives...")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
include/str.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/str.h b/include/str.h
index d433e6e..1d911e6 100644
--- a/include/str.h
+++ b/include/str.h
@@ -72,8 +72,6 @@ strntoken(char *str, size_t max, const char *delims, char **token, char *state)
return 0;
tokend = &str[max-1];
- if (!str || max == 0 || !delims || !token)
- return 0;
/*
* the very special case of "" with max=1, where we have no prior
--
2.30.2
More information about the Efi
mailing list