ovs-vsctl: Allow "get" commands to create @names also.
[openvswitch] / lib / learning-switch.c
index 88a8618c8849ec8b983f5c2ae8b52c4dc000b46c..4e7645d7cf7d7fcada11d680aa210c93b0fa7623 100644 (file)
@@ -63,7 +63,7 @@ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(30, 300);
 
 static void queue_tx(struct lswitch *, struct rconn *, struct ofpbuf *);
 static void send_features_request(struct lswitch *, struct rconn *);
-static void send_default_flows(struct lswitch *sw, struct rconn *rconn, 
+static void send_default_flows(struct lswitch *sw, struct rconn *rconn,
                                FILE *default_flows);
 
 typedef void packet_handler_func(struct lswitch *, struct rconn *, void *);
@@ -220,10 +220,10 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn,
         }
     }
     if (VLOG_IS_DBG_ENABLED()) {
-        char *p = ofp_to_string(msg->data, msg->size, 2);
+        char *s = ofp_to_string(msg->data, msg->size, 2);
         VLOG_DBG_RL(&rl, "%016llx: OpenFlow packet ignored: %s",
-                    sw->datapath_id, p);
-        free(p);
+                    sw->datapath_id, s);
+        free(s);
     }
 }
 \f
@@ -249,7 +249,7 @@ send_features_request(struct lswitch *sw, struct rconn *rconn)
 }
 
 static void
-send_default_flows(struct lswitch *sw, struct rconn *rconn, 
+send_default_flows(struct lswitch *sw, struct rconn *rconn,
                    FILE *default_flows)
 {
     char line[1024];
@@ -260,20 +260,20 @@ send_default_flows(struct lswitch *sw, struct rconn *rconn,
         uint16_t priority, idle_timeout, hard_timeout;
         uint64_t cookie;
         struct ofp_match match;
-        
+
         char *comment;
-        
+
         /* Delete comments. */
         comment = strchr(line, '#');
-        if (comment) { 
+        if (comment) {
             *comment = '\0';
         }
-        
+
         /* Drop empty lines. */
         if (line[strspn(line, " \t\n")] == '\0') {
             continue;
-        }   
-    
+        }
+
         /* Parse and send.  str_to_flow() will expand and reallocate the data
          * in 'buffer', so we can't keep pointers to across the str_to_flow()
          * call. */