public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace static local variable
Date: Fri, 9 Dec 2016 02:43:16 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D58EB010A@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1481250033-79820-1-git-send-email-dandan.bi@intel.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Regards,
Ray

>-----Original Message-----
>From: Bi, Dandan
>Sent: Friday, December 9, 2016 10:21 AM
>To: edk2-devel@lists.01.org
>Cc: Ni, Ruiyu <ruiyu.ni@intel.com>
>Subject: [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace static local variable
>
>Create global variable "mMonthDays" to replace static local
>variable "MonthDays" in function FatIsValidTime() in Misc.c.
>
>Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Dandan Bi <dandan.bi@intel.com>
>---
> FatPkg/EnhancedFatDxe/Misc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/FatPkg/EnhancedFatDxe/Misc.c b/FatPkg/EnhancedFatDxe/Misc.c
>index f91759c..c7455a4 100644
>--- a/FatPkg/EnhancedFatDxe/Misc.c
>+++ b/FatPkg/EnhancedFatDxe/Misc.c
>@@ -21,10 +21,11 @@ Abstract:
> Revision History
>
> --*/
>
> #include "Fat.h"
>+UINT8  mMonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
>
> FAT_TASK *
> FatCreateTask (
>   FAT_IFILE           *IFile,
>   EFI_FILE_IO_TOKEN   *Token
>@@ -696,11 +697,10 @@ Returns:
>   TRUE                  - The time is valid.
>   FALSE                 - The time is not valid.
>
> --*/
> {
>-  static UINT8  MonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
>   UINTN         Day;
>   BOOLEAN       ValidTime;
>
>   ValidTime = TRUE;
>
>@@ -723,11 +723,11 @@ Returns:
>
>   } else {
>     //
>     // Perform a more specific check of the day of the month
>     //
>-    Day = MonthDays[Time->Month - 1];
>+    Day = mMonthDays[Time->Month - 1];
>     if (Time->Month == 2 && IS_LEAP_YEAR (Time->Year)) {
>       Day += 1;
>       //
>       // 1 extra day this month
>       //
>--
>1.9.5.msysgit.1



      reply	other threads:[~2016-12-09  2:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09  2:20 [PATCH v2 2/8] FatPkg/EnhancedFatDxe: Use global variable replace static local variable Dandan Bi
2016-12-09  2:43 ` Ni, Ruiyu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=734D49CCEBEEF84792F5B80ED585239D58EB010A@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox