Bug 210706 - freebsd/sys/boot/efi/boot1/boot1.c:631]: (style) Suspicious condition
Summary: freebsd/sys/boot/efi/boot1/boot1.c:631]: (style) Suspicious condition
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-29 19:34 UTC by David Binderman
Modified: 2016-07-25 14:30 UTC (History)
1 user (show)

See Also:
emaste: mfc-stable10+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2016-06-29 19:34:30 UTC
freebsd/sys/boot/efi/boot1/boot1.c:631]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.

Source code is

        if ((status = bs->AllocatePool(EfiLoaderData, hsize,
            (void **)&handles) != EFI_SUCCESS)) {

Maybe better code

        if ((status = bs->AllocatePool(EfiLoaderData, hsize,
            (void **)&handles)) != EFI_SUCCESS) {
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-07-04 16:51:07 UTC
A commit references this bug:

Author: emaste
Date: Mon Jul  4 16:50:21 UTC 2016
New revision: 302335
URL: https://svnweb.freebsd.org/changeset/base/302335

Log:
  boot1.efi: fix assignment / comparison expression

  PR:		210706
  Submitted by:	David Binderman <dcb314@hotmail.com>
  Approved by:	re (kib)
  MFC after:	1 week

Changes:
  head/sys/boot/efi/boot1/boot1.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-07-25 14:29:04 UTC
A commit references this bug:

Author: emaste
Date: Mon Jul 25 14:28:50 UTC 2016
New revision: 303294
URL: https://svnweb.freebsd.org/changeset/base/303294

Log:
  MFC r302335: boot1.efi: fix assignment / comparison expression

  PR:		210706
  Submitted by:	David Binderman <dcb314@hotmail.com>

Changes:
_U  stable/10/
  stable/10/sys/boot/efi/boot1/boot1.c