From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: Re: [PATCH] knownnetworks: update known frequencies maximum to 7115
Date: Thu, 03 Mar 2022 12:23:07 -0800 [thread overview]
Message-ID: <95e6332cce4340c0db255465ad6b43c513de44ed.camel@gmail.com> (raw)
In-Reply-To: 7452861.j3UhPhjJgs@bagend
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
On Thu, 2022-03-03 at 18:59 +0100, Diederik de Haas wrote:
> On Thursday, 3 March 2022 18:22:34 CET James Prestwood wrote:
> > - if (unlikely(errno == ERANGE || !t || t > 6000))
> > + if (unlikely(errno == ERANGE || !t || t > 7115))
>
> Sorry if this is a dumb comment, but why use a 'magic number' [1]
> (which
> meaning can be derived from the git commit comment, but not when just
> looking
> at the source)?
I'm not sure if we have a style/rule about this but I think generally
if the value is only used once, and its clear what it is, a macro may
not be required.
*waits for angry mob*
Denis' recommendation solves a few potential issues in addition to just
updating, including the hard coded value.
>
> 1) https://en.wikipedia.org/wiki/Magic_number_(programming)
next reply other threads:[~2022-03-03 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 20:23 James Prestwood [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-03 18:57 [PATCH] knownnetworks: update known frequencies maximum to 7115 Denis Kenzior
2022-03-03 17:59 Diederik de Haas
2022-03-03 17:22 James Prestwood
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-all 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=95e6332cce4340c0db255465ad6b43c513de44ed.camel@gmail.com \
--to=iwd@lists.linux.dev \
/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