From 77ef29358d7cfb5962cab175995e9e48399a991d Mon Sep 17 00:00:00 2001 From: Yves Rutschle Date: Wed, 15 Jul 2015 15:09:39 +0200 Subject: [PATCH] make code C-compliant --- probe.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/probe.c b/probe.c index 4b76ecf..5626983 100644 --- a/probe.c +++ b/probe.c @@ -1,7 +1,7 @@ /* # probe.c: Code for probing protocols # -# Copyright (C) 2007-2012 Yves Rutschle +# Copyright (C) 2007-2015 Yves Rutschle # # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public @@ -221,6 +221,7 @@ static int is_sni_protocol(const char *p, int len, struct proto *proto) { int valid_tls; char *hostname; + char **sni_hostname; valid_tls = parse_tls_header(p, len, &hostname); @@ -232,9 +233,7 @@ static int is_sni_protocol(const char *p, int len, struct proto *proto) /* Assume does not match */ valid_tls = PROBE_NEXT; - char **sni_hostname = proto->data; - - for (; *sni_hostname; sni_hostname++) + for (sni_hostname = proto->data; *sni_hostname; sni_hostname++) if(!strcmp(hostname, *sni_hostname)) { valid_tls = PROBE_MATCH; break;