public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter.Chubb at data61.csiro.au <Peter.Chubb@data61.csiro.au>
To: u-boot@lists.denx.de
Subject: [U-Boot] "_ENTRY" is both a struct and a typedef?
Date: Thu, 8 Sep 2016 20:34:25 +0000	[thread overview]
Message-ID: <84shta9lmb.wl-Peter.Chubb@data61.csiro.au> (raw)
In-Reply-To: <alpine.LFD.2.20.1609081230190.20232@localhost.localdomain>

>>>>> "Robert" == Robert P J Day <rpjday@crashcourse.ca> writes:

Robert>   from lib/hashtable.c:

Robert>   typedef struct _ENTRY { int used; ENTRY entry; } _ENTRY;

Robert> ok, that's just kind of creepy ... defining a typedef over top
Robert> of a struct of the same name. does anyone else find that
Robert> strange?

It's standard practice in some C styles.  Personally I'd delete the
struct tag, as the typedef should be used everywhere instead.

Peter C
-- 
Dr Peter Chubb         Tel: +61 2 9490 5852      http://ts.data61.csiro.au/
Trustworthy Systems Group                           Data61 (formerly NICTA)

  reply	other threads:[~2016-09-08 20:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 16:31 [U-Boot] "_ENTRY" is both a struct and a typedef? Robert P. J. Day
2016-09-08 20:34 ` Peter.Chubb at data61.csiro.au [this message]
2016-09-09 11:15   ` Måns Rullgård

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=84shta9lmb.wl-Peter.Chubb@data61.csiro.au \
    --to=peter.chubb@data61.csiro.au \
    --cc=u-boot@lists.denx.de \
    /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