lkml.org 
[lkml]   [2005]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/13] FAT: Return better error codes from vfat_valid_longname()
From
Date
Rogério Brito <rbrito@ime.usp.br> writes:

> On Jan 18 2005, OGAWA Hirofumi wrote:
>> static int vfat_valid_longname(const unsigned char *name, unsigned int len)
>> {
>> - if (len && name[len-1] == ' ')
>> - return 0;
>> + if (name[len - 1] == ' ')
>> + return -EINVAL;
>
> Sorry for the stupid question, but is len guaranteed to be always greater
> than zero?

Yes. That "len" was already checked in vfat_add_entry().

Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:2.767 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site