Skip to content

Commit

Permalink
fs/adfs/adfs.h: fix unsigned comparison
Browse files Browse the repository at this point in the history
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 <geert@linux-m68k.org>
Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 24, 2011
1 parent f48fea0 commit 135a9fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/adfs/adfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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++ = ',';
Expand Down

0 comments on commit 135a9fc

Please sign in to comment.