Re: [PATCH 6/7] CLI: make static message strings const

Subject: Re: [PATCH 6/7] CLI: make static message strings const

Date: Fri, 14 May 2021 07:24:45 -0300

To: Tomi Ollila, notmuch@notmuchmail.org

Cc:

From: David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

>
> In my projects I've been using the following macro:
> #define WriteCS(fd, str) write((fd), (str), sizeof(str) - 1)
> but I don't know if that behaved any better (if we cared)...

I'm not sure. The sizeof here is actually slightly treacherous (iiuc,
making things const char * will blow up the world) so I prefer it out in
the open.

> But, in addition to these two identical copies of handle_sigint()
> also notmuch-new.c and notmuch-reindex.c defines anoter 2 identical
> copies of handle_sigint()...
>
> I did not see that those two were also modified in this series...

Good catch! I did the same for those two and pushed the modified series.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: