summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/SmmPeriodicSmiLib
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-02-15 17:09:43 +0100
committerStar Zeng <star.zeng@intel.com>2018-07-06 17:26:15 +0800
commit108136f2637ce9376d00ce8f11326ae40297fee0 (patch)
tree4349d6cbb04e322a1034a76cfecc8cf4bd4a40ad /MdePkg/Library/SmmPeriodicSmiLib
parentb1bbc119f1b9e86dcbbb8d45669c2c6f5b6fab9e (diff)
downloadedk2-108136f2637ce9376d00ce8f11326ae40297fee0.tar.gz
edk2-108136f2637ce9376d00ce8f11326ae40297fee0.tar.bz2
edk2-108136f2637ce9376d00ce8f11326ae40297fee0.zip
MdePkg/BaseSafeIntLib: clean up parentheses in MIN_INT64_MAGNITUDE
The definition of the MIN_INT64_MAGNITUDE macro is correct, but it's harder to read than necessary: the sub-expression (( (UINT64) - (MIN_INT64 + 1) )) is doubly parenthesized. Reusing one pair of the outer parens, rewrite the sub-expression (without change in meaning) so that the minus sign cannot be mistaken for subtraction: ( (UINT64)(- (MIN_INT64 + 1)) ) The resultant macro definition matches the following expressions in SafeInt64Mult(): > // > // Avoid negating the most negative number. > // > UnsignedMultiplicand = ((UINT64)(- (Multiplicand + 1))) + 1; and > // > // Avoid negating the most negative number. > // > UnsignedMultiplier = ((UINT64)(- (Multiplier + 1))) + 1; Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Michael D Kinney <michael.d.kinney@intel.com> (cherry picked from commit 8c33cc0ec926b17396fcd71686c727b991984d4a)
Diffstat (limited to 'MdePkg/Library/SmmPeriodicSmiLib')
0 files changed, 0 insertions, 0 deletions