cmake: add more hardening compiler flags
[project/uci.git] / parse.c
diff --git a/parse.c b/parse.c
index 3bea3e4707c719ff2b4b59d267e8ec1325d2385c..499c32ea17d496ba1c63f644c7f1d7eac823ec2f 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -9,7 +9,7 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
  */
 
 #include <string.h>
@@ -35,7 +35,7 @@ void uci_parse_section(struct uci_section *s, const struct uci_parse_option *opt
                        if (strcmp(opts[i].name, o->e.name) != 0)
                                continue;
 
-                       if (opts[i].type >= 0 && opts[i].type != o->type)
+                       if (opts[i].type != o->type)
                                continue;
 
                        /* match found */
@@ -78,7 +78,9 @@ static uint32_t hash_murmur2(uint32_t h, const void * key, int len)
        switch(len)
        {
        case 3: h ^= data[2] << 16;
+               /* fall through */
        case 2: h ^= data[1] << 8;
+               /* fall through */
        case 1: h ^= data[0];
                h *= m;
        };