Skip to content

Commit

Permalink
efivarfs: Make 'datasize' unsigned long
Browse files Browse the repository at this point in the history
There's no reason to declare 'datasize' as an int, since the majority
of the functions it's passed to expect an unsigned long anyway. Plus,
this way we avoid any sign problems during arithmetic.

Acked-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
  • Loading branch information
Matt Fleming committed Oct 30, 2012
1 parent 9171632 commit 07b1c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ static ssize_t efivarfs_file_write(struct file *file,
void *data;
u32 attributes;
struct inode *inode = file->f_mapping->host;
int datasize = count - sizeof(attributes);
unsigned long datasize = count - sizeof(attributes);
unsigned long newdatasize;

if (count < sizeof(attributes))
Expand Down

0 comments on commit 07b1c5b

Please sign in to comment.