Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@toke.dk>
To: Pete Heist <pete@heistp.net>
Cc: Jonathan Morton <chromatix99@gmail.com>,
	Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] issue with Cake and bpf filter
Date: Wed, 22 Aug 2018 11:41:52 +0200	[thread overview]
Message-ID: <87r2iq91r3.fsf@toke.dk> (raw)
In-Reply-To: <2689078D-1548-49E7-A9BC-B39980002278@toke.dk>

Toke Høiland-Jørgensen <toke@toke.dk> writes:

>>Lastly, if anyone has time to review even just a little code for what
>>is or is not good or idiomatic C, post an issue and I’d appreciate it.
>>Yes, I yield to the ‘goto’ proponents when it comes to error handling
>>and resource de-allocation. :)
>
> I'll take a look tomorrow :)

I can tell from the code that you're coming from Go. But the only thing
I found strange on a cursory glance was your error handling method of
returning a pointer that is NULL on success. I know this corresponds to
"return 0 on success", but, well I was thrown off by the "return NULL"
statements in functions indicating success. The usual pattern is to
return the error code, and pass in a pointer to the error struct that is
only filled if the return code is != 0.

This is very much a matter of taste, though, and if you prefer your
current style just keep it :)

-Toke

  parent reply	other threads:[~2018-08-22  9:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-12  8:17 Pete Heist
2018-08-12 10:23 ` Pete Heist
2018-08-12 13:41   ` Jonathan Morton
2018-08-12 19:42     ` Toke Høiland-Jørgensen
2018-08-12 21:34       ` Jonathan Morton
2018-08-13  0:21         ` Jonathan Morton
2018-08-13  5:44           ` Jonathan Morton
2018-08-13 11:01           ` Toke Høiland-Jørgensen
2018-08-21 11:25             ` Toke Høiland-Jørgensen
2018-08-21 21:06               ` Pete Heist
2018-08-21 21:17                 ` Toke Høiland-Jørgensen
2018-08-21 21:46                   ` Pete Heist
2018-08-22  9:49                     ` Toke Høiland-Jørgensen
2018-08-22  9:41                   ` Toke Høiland-Jørgensen [this message]
2018-08-22  6:17                 ` Jonathan Morton
2018-08-22  9:30                   ` Pete Heist
2018-08-22  9:37                     ` Toke Høiland-Jørgensen
2018-08-22  9:51                       ` Pete Heist
2018-08-22 10:00                         ` Jonathan Morton
2018-08-22 10:13                           ` Toke Høiland-Jørgensen
2018-08-22 10:32                             ` Pete Heist

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

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r2iq91r3.fsf@toke.dk \
    --to=toke@toke.dk \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    --cc=pete@heistp.net \
    /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