diff for duplicates of <4F621F87.3040408@gmail.com> diff --git a/a/1.txt b/N1/1.txt index f4badd5..4d8d2ad 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -28,7 +28,8 @@ Acked-by: Dirk Brandewie <dirk.brandewie@intel.com> > static int max17042_init_model(struct max17042_chip *chip) > { > int ret; -> - int table_size > - sizeof(chip->pdata->config_data->cell_char_tbl)/sizeof(u16); +> - int table_size = +> - sizeof(chip->pdata->config_data->cell_char_tbl)/sizeof(u16); > + int table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl); > u16 *temp_data; > @@ -41,7 +42,8 @@ Acked-by: Dirk Brandewie <dirk.brandewie@intel.com> > static int max17042_verify_model_lock(struct max17042_chip *chip) > { > int i; -> - int table_size > - sizeof(chip->pdata->config_data->cell_char_tbl); +> - int table_size = +> - sizeof(chip->pdata->config_data->cell_char_tbl); > + int table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl); > u16 *temp_data; > int ret = 0; diff --git a/a/content_digest b/N1/content_digest index 93c828c..c2c63b9 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020120315113732.GA364@elgon.mountain\0" "From\0Dirk Brandewie <dirk.brandewie@gmail.com>\0" "Subject\0Re: [patch] max17042_battery: fix a couple buffer overflows\0" - "Date\0Thu, 15 Mar 2012 16:57:43 +0000\0" + "Date\0Thu, 15 Mar 2012 09:57:43 -0700\0" "To\0Dan Carpenter <dan.carpenter@oracle.com>\0" "Cc\0Grant Likely <grant.likely@secretlab.ca>" Dirk Brandewie <dirk.brandewie@gmail.com> @@ -45,7 +45,8 @@ "> static int max17042_init_model(struct max17042_chip *chip)\n" "> {\n" "> \tint ret;\n" - "> -\tint table_size > -\t\tsizeof(chip->pdata->config_data->cell_char_tbl)/sizeof(u16);\n" + "> -\tint table_size =\n" + "> -\t\tsizeof(chip->pdata->config_data->cell_char_tbl)/sizeof(u16);\n" "> +\tint table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl);\n" "> \tu16 *temp_data;\n" ">\n" @@ -58,7 +59,8 @@ "> static int max17042_verify_model_lock(struct max17042_chip *chip)\n" "> {\n" "> \tint i;\n" - "> -\tint table_size > -\t\tsizeof(chip->pdata->config_data->cell_char_tbl);\n" + "> -\tint table_size =\n" + "> -\t\tsizeof(chip->pdata->config_data->cell_char_tbl);\n" "> +\tint table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl);\n" "> \tu16 *temp_data;\n" "> \tint ret = 0;\n" @@ -69,4 +71,4 @@ "> \t\treturn -ENOMEM;\n" > -51192ac02739e15296b8e6d7eb327ddfe67b9c81d25329d4d3cba17e4edac097 +77ebbd08e1de85398927454fe8a0e78abc13293d5910a93324e11ae4a396a99c
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.