X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsvec.c;h=79c835551d5c67e15360d0d885a8609a2b687db7;hb=67b30fcde789088b2e43407167f9ad656c2cc1e5;hp=9d0f313d9966bda0b22147c95a8d73b4f0b9481a;hpb=cfae8ec3e7ba9e02d4f994f77ef70435cd3575e5;p=openvswitch diff --git a/lib/svec.c b/lib/svec.c index 9d0f313d..79c83555 100644 --- a/lib/svec.c +++ b/lib/svec.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +22,10 @@ #include #include "dynamic-string.h" #include "util.h" - -#define THIS_MODULE VLM_svec #include "vlog.h" +VLOG_DEFINE_THIS_MODULE(svec) + void svec_init(struct svec *svec) { @@ -59,6 +59,12 @@ svec_clear(struct svec *svec) svec->n = 0; } +bool +svec_is_empty(const struct svec *svec) +{ + return svec->n == 0; +} + void svec_add(struct svec *svec, const char *name) {