diff mbox

[V9fs-developer] Fwd: [patch] 9p: saving negative to unsigned char

Message ID a4e6962a1003301134ue2cdb84u4afe5baeba8649ce@mail.gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Eric Van Hensbergen March 30, 2010, 6:34 p.m. UTC
None
diff mbox

Patch

diff --git a/net/9p/client.c b/net/9p/client.c
index e3e5bf4..edf31aa 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -71,9 +71,10 @@  inline int p9_is_proto_dotu(struct p9_client *clnt)
 EXPORT_SYMBOL(p9_is_proto_dotu);

 /* Interpret mount option for protocol version */
-static unsigned char get_protocol_version(const substring_t *name)
+static int get_protocol_version(const substring_t *name)
 {
-       unsigned char version = -EINVAL;
+       int version = -EINVAL;
+
       if (!strncmp("9p2000", name->from, name->to-name->from)) {
               version = p9_proto_legacy;
               P9_DPRINTK(P9_DEBUG_9P, "Protocol version: Legacy\n");