OSDN Git Service

efivarfs: Use sizeof() instead of magic number
authorMatt Fleming <matt.fleming@intel.com>
Fri, 11 Jan 2013 13:30:46 +0000 (13:30 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Thu, 31 Jan 2013 14:44:44 +0000 (14:44 +0000)
commit94a193fb7393a50625abd9ca21f8afea275a9f87
tree3a2ae392ae294bc5f67da5f43f725819f8a1a913
parentdeb94101c4fda22e152c2a311210cf09ae51adf6
efivarfs: Use sizeof() instead of magic number

Instead of adding a magic 4 to the variable size, use sizeof() to make
it explicitly clear what the quantity represents (the variable's
attributes).

CC: Jeremy Kerr <jeremy.kerr@canonical.com>
Cc: Chun-Yi Lee <joeyli.kernel@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>
Reported-by: Lingzhu Xiang <lxiang@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
drivers/firmware/efivars.c