aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Trentalancia <guido@trentalancia.net>2017-06-06 00:08:13 +0200
committerJason Zaman <jason@perfinion.com>2017-06-13 15:59:58 +0800
commit47a129496e11fe3fb46818410ae53615531c1ff1 (patch)
tree687bb06ac925b9eec98093f0c95ff0c394876d8b
parentgpg: Module version bump for patch from Guido Trentalancia. (diff)
downloadhardened-refpolicy-47a129496e11fe3fb46818410ae53615531c1ff1.tar.gz
hardened-refpolicy-47a129496e11fe3fb46818410ae53615531c1ff1.tar.bz2
hardened-refpolicy-47a129496e11fe3fb46818410ae53615531c1ff1.zip
fc_sort: avoid compiler warning/error
Fix a "-Werror=implicit-fallthrough" compiler warning/error on the switch statement. This third version (v3) fixes a bug introduced in the first version and improves the style over the second version. Signed-off-by: Guido Trentalancia <guido at trentalancia.com>
-rw-r--r--support/fc_sort.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/support/fc_sort.c b/support/fc_sort.c
index 5561288ad..66cdf39fd 100644
--- a/support/fc_sort.c
+++ b/support/fc_sort.c
@@ -292,14 +292,16 @@ void fc_fill_data(file_context_node_t *fc_node)
/* If a escape character is found,
* skip the next character. */
c++;
+ break;
default:
- /* If no meta character has been found yet,
- * add one to the stem length. */
- if (!fc_node->meta)
- fc_node->stem_len++;
break;
}
+ /* If no meta character has been found yet,
+ * add one to the stem length. */
+ if (!fc_node->meta)
+ fc_node->stem_len++;
+
fc_node->str_len++;
c++;
}