[4156] in BarnOwl Developers
Re: [barnowl/barnowl] Assorted undefined behavior fixes (#182)
daemon@ATHENA.MIT.EDU (Jason Gross)
Sun Oct 8 12:10:20 2017
Date: Sun, 08 Oct 2017 08:42:36 -0700
From: Jason Gross <notifications@github.com>
Reply-To: barnowl/barnowl <reply+004448c9d548c80d1c240754edf5d79eac9bf3648cbb417f92cf0000000115f2096c92a169ce0fb69583@reply.github.com>
To: barnowl/barnowl <barnowl@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
In-Reply-To: <barnowl/barnowl/pull/182@github.com>
----==_mimepart_59da476cc57a2_dbd3fd873b6af2c541e0
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
JasonGross requested changes on this pull request.
LGTM modulo explanationless magic numbers (and assuming it builds and runs; I haven't tested it)
> @@ -29,6 +29,8 @@ static owl_fmtext_cache *owl_message_next_fmtext(void)
void owl_message_init(owl_message *m)
{
+ char timestr[26];
This magic number should get a constant name, or at least a comment.
> @@ -774,7 +777,7 @@ void owl_message_create_from_znotice(owl_message *m, const ZNotice_t *n)
#else /* !ZNOTICE_SOCKADDR */
struct hostent *hent;
#endif /* ZNOTICE_SOCKADDR */
- char *tmp, *tmp2;
+ char timestr[26], *tmp, *tmp2;
This magic number should get a constant name, or at least a comment.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/barnowl/barnowl/pull/182#pullrequestreview-67860516
----==_mimepart_59da476cc57a2_dbd3fd873b6af2c541e0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p><b>@JasonGross</b> requested changes on this pull request.</p>
<p>LGTM modulo explanationless magic numbers (and assuming it builds and runs; I haven't tested it)</p><hr>
<p>In <a href="https://github.com/barnowl/barnowl/pull/182#discussion_r143357941">message.c</a>:</p>
<pre style='color:#555'>> @@ -29,6 +29,8 @@ static owl_fmtext_cache *owl_message_next_fmtext(void)
void owl_message_init(owl_message *m)
{
+ char timestr[26];
</pre>
<p>This magic number should get a constant name, or at least a comment.</p>
<hr>
<p>In <a href="https://github.com/barnowl/barnowl/pull/182#discussion_r143357970">message.c</a>:</p>
<pre style='color:#555'>> @@ -774,7 +777,7 @@ void owl_message_create_from_znotice(owl_message *m, const ZNotice_t *n)
#else /* !ZNOTICE_SOCKADDR */
struct hostent *hent;
#endif /* ZNOTICE_SOCKADDR */
- char *tmp, *tmp2;
+ char timestr[26], *tmp, *tmp2;
</pre>
<p>This magic number should get a constant name, or at least a comment.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/barnowl/barnowl/pull/182#pullrequestreview-67860516">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AERIycbUoaaxd0ZUjOTqjToVGKvrnVt0ks5sqO1sgaJpZM4PxRFa">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AERIyfdli29Xi2sA_qfWQ_raWgpeZh_pks5sqO1sgaJpZM4PxRFa.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/barnowl/barnowl/pull/182#pullrequestreview-67860516"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/barnowl/barnowl","title":"barnowl/barnowl","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/barnowl/barnowl"}},"updates":{"snippets":[{"icon":"PERSON","message":"@JasonGross requested changes on #182"}],"action":{"name":"View Pull Request","url":"https://github.com/barnowl/barnowl/pull/182#pullrequestreview-67860516"}}}</script>
----==_mimepart_59da476cc57a2_dbd3fd873b6af2c541e0--