aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-28 09:25:17 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-28 09:25:17 -0400
commita64d79ca4c5699be161a54d94e0e6c0f7d06db7c (patch)
tree5d0fa776b824fe9bd30014e92259c7d0805b3e34 /src/common/util.c
parent9727a9248a474909c0ad53be9d55cd39b69d0611 (diff)
downloadtor-a64d79ca4c5699be161a54d94e0e6c0f7d06db7c.tar.gz
tor-a64d79ca4c5699be161a54d94e0e6c0f7d06db7c.zip
Move around some LCOV_EXCLs in src/common
Apparently, my compiler now generates coverage markers for label-only lines, so we need to exclude those too if they are meant to be unreachable.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index bcb1449a18..5ff7e104d6 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -2980,8 +2980,9 @@ unescape_string(const char *s, char **result, size_t *size_out)
*out = '\0';
if (size_out) *size_out = out - *result;
return cp+1;
- case '\0':
+
/* LCOV_EXCL_START -- we caught this in parse_config_from_line. */
+ case '\0':
tor_fragile_assert();
tor_free(*result);
return NULL;
@@ -3029,8 +3030,9 @@ unescape_string(const char *s, char **result, size_t *size_out)
*out++ = cp[1];
cp += 2;
break;
- default:
+
/* LCOV_EXCL_START */
+ default:
/* we caught this above in the initial loop. */
tor_assert_nonfatal_unreached();
tor_free(*result); return NULL;