aboutsummaryrefslogtreecommitdiff
path: root/fsdev
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2017-05-25 10:30:13 +0200
committerGreg Kurz <groug@kaod.org>2017-05-25 10:30:13 +0200
commit57a0aa6b507050734e302f1ff6da452518bd74e8 (patch)
treed4dfa738bd4c52461e7a564e310688d2ffc30296 /fsdev
parent506f3275829258fdf193bbf0f98f3f9e8c0f3c45 (diff)
fsdev: don't allow unknown format in marshal/unmarshal
The code only uses well known format strings. An unknown format token is a bug. Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'fsdev')
-rw-r--r--fsdev/9p-iov-marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c
index 1d16f8df4b..a1c9beddd2 100644
--- a/fsdev/9p-iov-marshal.c
+++ b/fsdev/9p-iov-marshal.c
@@ -168,7 +168,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
break;
}
default:
- break;
+ g_assert_not_reached();
}
if (copied < 0) {
return copied;
@@ -281,7 +281,7 @@ ssize_t v9fs_iov_vmarshal(struct iovec *in_sg, int in_num, size_t offset,
break;
}
default:
- break;
+ g_assert_not_reached();
}
if (copied < 0) {
return copied;