ovsdb-idlc: Use column name for "*_set_*" smap arguments.
[cascardo/ovs.git] / ovsdb / ovsdb-idlc.in
index 67e8a4e..55b695e 100755 (executable)
@@ -478,21 +478,21 @@ const struct ovsdb_datum *
             if type.is_smap():
                 print """
 void
-%(s)s_set_%(c)s(const struct %(s)s *row, const struct smap *smap)
+%(s)s_set_%(c)s(const struct %(s)s *row, const struct smap *%(c)s)
 {
     struct ovsdb_datum datum;
 
     ovs_assert(inited);
-    if (smap) {
+    if (%(c)s) {
         struct smap_node *node;
         size_t i;
 
-        datum.n = smap_count(smap);
+        datum.n = smap_count(%(c)s);
         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
         datum.values = xmalloc(datum.n * sizeof *datum.values);
 
         i = 0;
-        SMAP_FOR_EACH (node, smap) {
+        SMAP_FOR_EACH (node, %(c)s) {
             datum.keys[i].string = xstrdup(node->key);
             datum.values[i].string = xstrdup(node->value);
             i++;