[tor-commits] [tor/maint-0.3.3] Don't strlen before checking for NULL
nickm at torproject.org
nickm at torproject.org
Wed Mar 28 11:50:56 UTC 2018
commit 09351c34e9bea4d29fb6f4ac8d40e3bee49e12fc
Author: rl1987 <rl1987 at sdf.lonestar.org>
Date: Thu Feb 22 19:52:40 2018 +0100
Don't strlen before checking for NULL
---
src/common/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/util.c b/src/common/util.c
index 497b60be1..5ae4d0408 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1079,7 +1079,7 @@ string_is_valid_dest(const char *string)
{
char *tmp = NULL;
int retval;
- size_t len = strlen(string);
+ size_t len;
if (string == NULL)
return 0;
More information about the tor-commits
mailing list