Bug 229663 - src/sys/netinet/libalias/alias_irc.c:101: poor error checking
Summary: src/sys/netinet/libalias/alias_irc.c:101: poor error checking
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-10 06:42 UTC by David Binderman
Modified: 2018-07-14 15:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2018-07-10 06:42:12 UTC
src/sys/netinet/libalias/alias_irc.c:101]: (style) Same expression on both sides of '||'.

Source code is

        if (ah->dport == NULL || ah->dport == NULL || ah->lnk == NULL ||
            ah->maxpktsize == 0)
                return (-1);

Maybe better code

        if (ah->sport == NULL || ah->dport == NULL || ah->lnk == NULL ||
            ah->maxpktsize == 0)
                return (-1);
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-07-11 14:55:25 UTC
A commit references this bug:

Author: markj
Date: Wed Jul 11 14:54:56 UTC 2018
New revision: 336199
URL: https://svnweb.freebsd.org/changeset/base/336199

Log:
  Remove a duplicate check.

  PR:		229663
  Submitted by:	David Binderman <dcb314@hotmail.com>
  MFC after:	3 days

Changes:
  head/sys/netinet/libalias/alias_irc.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-14 15:33:39 UTC
A commit references this bug:

Author: markj
Date: Sat Jul 14 15:32:37 UTC 2018
New revision: 336279
URL: https://svnweb.freebsd.org/changeset/base/336279

Log:
  MFC r336199:
  Remove a duplicate check.

  PR:	229663

Changes:
_U  stable/11/
  stable/11/sys/netinet/libalias/alias_irc.c