question regarding style(9) and field initialisers in structs

看板FB_questions作者時間14年前 (2011/10/31 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1EhP3YEJ (FB_questions)