From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v2] man/man3/strftime.3: Check parameter
Date: Tue, 19 Aug 2025 11:46:07 +0000 [thread overview]
Message-ID: <aKRj_-jnlO_BxWHr@gallifrey> (raw)
In-Reply-To: <sa3mkaxgskcwrma3g7chd6d2bokswwk6i32bn74ueca3qr7f63@tn4ddlmihqon>
* Alejandro Colomar (alx@kernel.org) wrote:
> Hi Dave,
>
> On Mon, Aug 18, 2025 at 06:45:53PM +0100, dave@treblig.org wrote:
> > From: "Dr. David Alan Gilbert" <dave@treblig.org>
> >
> > The strftime example requires a format paramter. If you don't
> > pass one it crashes.
> > Check for the parameter.
> >
> > Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
>
> Thanks! I've applied the patch. (But see some minor comment below.)
Thanks!
Is that something that I can spot locally?
Since I seem to be working my way through the set checking most of the
examples, I'm probably going to be posting some more so I should
get the checks running.
I'm trying to run:
make -R lint build-all check
but it seems to be missing 'checkpatch' and I'm not sure which checkpatch
that is. (I'm on Fedora 42).
Dave
>
> Have a lovely day!
> Alex
>
> > ---
> > v2
> > Use a more standard Usage: format.
> >
> > man/man3/strftime.3 | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/man/man3/strftime.3 b/man/man3/strftime.3
> > index 4a3f805bb..a27dfd01b 100644
> > --- a/man/man3/strftime.3
> > +++ b/man/man3/strftime.3
> > @@ -739,6 +739,11 @@ .SS Program source
> > char outstr[200];
> > time_t t;
> > struct tm *tmp;
> > +\&
> > + if (argc != 2) {
> > + fprintf(stderr,"Usage: %s: <format\-string>\[rs]n", argv[0]);
>
> CI detected some issue in this line of code:
>
> remote: .tmp/man/man3/strftime.3.d/strftime.c:14: Missing space after , [whitespace/comma] [3]
>
> I've amended it with a space.
>
> > + exit(EXIT_FAILURE);
> > + }
> > \&
> > t = time(NULL);
> > tmp = localtime(&t);
> > --
> > 2.50.1
> >
>
> --
> <https://www.alejandro-colomar.es/>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
next prev parent reply other threads:[~2025-08-19 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 17:45 [PATCH v2] man/man3/strftime.3: Check parameter dave
2025-08-19 11:24 ` Alejandro Colomar
2025-08-19 11:46 ` Dr. David Alan Gilbert [this message]
2025-08-19 12:50 ` Alejandro Colomar
2025-08-19 18:03 ` Dr. David Alan Gilbert
2025-08-20 12:30 ` Alejandro Colomar
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=aKRj_-jnlO_BxWHr@gallifrey \
--to=dave@treblig.org \
--cc=alx@kernel.org \
--cc=linux-man@vger.kernel.org \
/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