[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.3.3] Don't strlen before checking for NULL
commit 09351c34e9bea4d29fb6f4ac8d40e3bee49e12fc
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits