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>
This commit is contained in:
Greg Kurz 2017-05-25 10:30:13 +02:00
parent 506f327582
commit 57a0aa6b50

View File

@ -168,7 +168,7 @@ ssize_t v9fs_iov_vunmarshal(struct iovec *out_sg, int out_num, size_t offset,
break; break;
} }
default: default:
break; g_assert_not_reached();
} }
if (copied < 0) { if (copied < 0) {
return copied; return copied;
@ -281,7 +281,7 @@ ssize_t v9fs_iov_vmarshal(struct iovec *in_sg, int in_num, size_t offset,
break; break;
} }
default: default:
break; g_assert_not_reached();
} }
if (copied < 0) { if (copied < 0) {
return copied; return copied;