[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20100306122245.GP4958@bicker>
Date: Sat, 6 Mar 2010 15:22:45 +0300
From: Dan Carpenter <error27@...il.com>
To: sripathik@...ibm.com
Cc: netdev@...r.kernel.org
Subject: bug report: 9p: 9P2010.L handshake: Add mount option
+static unsigned char get_protocol_version(const substring_t *name)
+{
+ unsigned char version = -EINVAL;
Assigning a negative value to an unsigned char is problematic. (If it's
an unsigned int or long that's different).
I have included a test program to illustrate.
regards,
dan carpenter
#include <stdio.h>
unsigned char n22(void) { return -22; }
int main()
{
int ret = n22();
if (ret == -22)
printf("true\n");
else
printf("false\n");
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists