From: Andrew Morton Date: Wed, 23 Mar 2011 23:41:43 +0000 (-0700) Subject: fs/adfs/adfs.h: fix unsigned comparison X-Git-Tag: v2.6.39-rc1~197 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=135a9fcf45f8d41b4ab008114792f4f6c6572675;p=karo-tx-linux.git fs/adfs/adfs.h: fix unsigned comparison fs/adfs/adfs.h: In function 'append_filetype_suffix': fs/adfs/adfs.h:115: warning: comparison is always false due to limited range of data type Reported-by: Geert Uytterhoeven Cc: Stuart Swales Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index a8a58d864f96..718ac1f440c6 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs/adfs.h @@ -112,7 +112,7 @@ struct object_info { /* RISC OS 12-bit filetype converts to ,xyz hex filename suffix */ static inline int append_filetype_suffix(char *buf, __u16 filetype) { - if (filetype == -1) + if (filetype == 0xffff) /* no explicit 12-bit file type was set */ return 0; *buf++ = ',';