X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fsvec.c;h=381ee324dce1b7ecf82247055a3825ac2b9084db;hb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;hp=bc3df23d511cb690f2b1d363b4fa859f3cb74b4c;hpb=5f55c39b21e69025045437ffbd3bb98fe6ce2e89;p=sliver-openvswitch.git diff --git a/lib/svec.c b/lib/svec.c index bc3df23d5..381ee324d 100644 --- a/lib/svec.c +++ b/lib/svec.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira, Inc. * * 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) { @@ -49,7 +49,7 @@ svec_destroy(struct svec *svec) } void -svec_clear(struct svec *svec) +svec_clear(struct svec *svec) { size_t i; @@ -372,22 +372,6 @@ svec_join(const struct svec *svec, return ds_cstr(&ds); } -/* Breaks 's' into tokens at any character in 'delimiters', and appends each - * token to 'svec'. Empty tokens are not added. */ -void -svec_split(struct svec *svec, const char *s_, const char *delimiters) -{ - char *s = xstrdup(s_); - char *save_ptr = NULL; - char *token; - - for (token = strtok_r(s, delimiters, &save_ptr); token != NULL; - token = strtok_r(NULL, delimiters, &save_ptr)) { - svec_add(svec, token); - } - free(s); -} - const char * svec_back(const struct svec *svec) {