From bb5e21d29b29384300336d369d8117ce89168197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Sat, 5 Oct 2013 20:36:11 +0200 Subject: [PATCH] add static strvec initializer macradd static strvec initializer macroo --- include/ucore/strvec.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/ucore/strvec.h b/include/ucore/strvec.h index 3789d78..4f577fa 100644 --- a/include/ucore/strvec.h +++ b/include/ucore/strvec.h @@ -23,6 +23,10 @@ struct UCStrv */ void uc_strv_init(struct UCStrv *strv); +/** static initializer. Use as: struct UCStrv foo = UC_STRV_INITIALIZER; +*/ +#define UC_STRV_INITIALIZER {0, 0, NULL} + /** * Grow the UCStrv so it can hold n more items *