From owner-freebsd-questions@FreeBSD.ORG Sun Oct 30 14:58:08 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1B8C2106566C; Sun, 30 Oct 2011 14:58:08 +0000 (UTC) Date: Sun, 30 Oct 2011 14:58:08 +0000 From: Alexander Best To: freebsd-questions@freebsd.org Message-ID: <20111030145808.GA66287@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: question regarding style(9) and field initialisers in structs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2011 14:58:08 -0000 hi there, i found hundreds of the following cases in the FreeBSD src: [...] struct periph_driver { periph_init_func_t init; char *driver_name; TAILQ_HEAD(,cam_periph) units; u_int generation; u_int flags; #define CAM_PERIPH_DRV_EARLY 0x01 }; [...] static struct periph_driver dadriver = { dainit, "da", TAILQ_HEAD_INITIALIZER(dadriver.units), /* generation */ 0 }; ...is it proper programming practice to forget about the last field, if it would have been initialised to 0? cheers. alex