]> git.proxmox.com Git - mirror_ovs.git/commitdiff
treewide: Get rid of // comments, even inside comments.
authorBen Pfaff <blp@ovn.org>
Wed, 23 Jan 2019 20:09:46 +0000 (12:09 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 25 Jan 2019 21:09:52 +0000 (13:09 -0800)
Just a style fix.

With this patch, the following reports no hits:

git ls-files | grep '\.[ch]$' | grep -vE 'datapath|sflow' \
    | xargs grep -n // | grep -vE "http|s/|'|\""

Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reported-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
include/openvswitch/ofpbuf.h
lib/backtrace.h
lib/hash.h
lib/netdev-bsd.c
lib/ofp-actions.c
lib/ovs-atomic.h
lib/rtbsd.c
lib/seq.h
lib/socket-util.c
ofproto/ofproto-dpif-ipfix.c
ofproto/ofproto-provider.h

index 71ee0c9534a31060784a890b129d33f910a50192..e4cf0883ceec5ef7e4c99b3acf22ef5523011e23 100644 (file)
@@ -72,7 +72,7 @@ struct ofpbuf {
  *
  * Usage example:
  *
- *     uint64_t stub[1024 / 8]; // 1 kB stub properly aligned for 64-bit data.
+ *     uint64_t stub[1024 / 8];         <-- 1 kB stub aligned for 64-bit data.
  *     struct ofpbuf ofpbuf = OFPBUF_STUB_INITIALIZER(stub);
  */
 #define OFPBUF_STUB_INITIALIZER(STUB) {         \
index 3eb92f7ad23de2ba6d837bc47763c485db15f19f..384f2700d94cd1b057ddee905dbe2d298a7d8a35 100644 (file)
@@ -27,8 +27,8 @@
  * desired:
  *       #include "backtrace.h"
  *
- *       log_backtrace();
- *       // A message can be added with log_backtrace_msg("your message")
+ *       log_backtrace();                           <-- plain
+ *       log_backtrace_msg("your message");         <-- with a message
  *
  *
  * A typical log will look like the following. The hex numbers listed after
index 6898719ca9100a54abfdd33b6f6db4e45d3e86f6..eb3776500abea8c08da1ceadcc0894642c8fae8b 100644 (file)
@@ -55,8 +55,8 @@ static inline uint32_t hash_string(const char *, uint32_t basis);
  *
  * The upstream license there says:
  *
- * // MurmurHash3 was written by Austin Appleby, and is placed in the public
- * // domain. The author hereby disclaims copyright to this source code.
+ *    MurmurHash3 was written by Austin Appleby, and is placed in the public
+ *    domain. The author hereby disclaims copyright to this source code.
  *
  * See hash_words() for sample usage. */
 
index 46698d54748f996cd8a450c5658d669f820b3fca..7875636cc3ccd10341bed904315f18a6e660d22b 100644 (file)
@@ -996,7 +996,7 @@ netdev_bsd_get_stats(const struct netdev *netdev_, struct netdev_stats *stats)
     mib[3] = IFMIB_IFDATA;
     len = sizeof(ifmd);
     for (i = 1; i <= if_count; i++) {
-        mib[4] = i; //row
+        mib[4] = i; /* row */
         if (sysctl(mib, 6, &ifmd, &len, (void *)0, 0) == -1) {
             VLOG_DBG_RL(&rl, "%s: sysctl failed: %s",
                         netdev_get_name(netdev_), ovs_strerror(errno));
index 96e39d6c6c9c0f340d0a3551d92b6145bea43c8f..f76db6c0f948d45778cf75de8a1e5c78b3791dce 100644 (file)
@@ -3569,10 +3569,10 @@ struct nx_action_cnt_ids {
     ovs_be16 n_controllers;     /* Number of controllers. */
     uint8_t zeros[4];           /* Must be zero. */
 
-    /* Followed by 1 or more controller ids.
+    /* Followed by 1 or more controller ids:
      *
-     * uint16_t cnt_ids[];        // Controller ids.
-     * uint8_t pad[];           // Must be 0 to 8-byte align cnt_ids[].
+     * uint16_t cnt_ids[];      -- Controller ids.
+     * uint8_t pad[];           -- Must be 0 to 8-byte align cnt_ids[].
      */
 };
 OFP_ASSERT(sizeof(struct nx_action_cnt_ids) == 16);
index 4664eefaf3a1230de3ec54b82f703446a81daa25..21e230e36f6b6f1ca9f0438de67a92d1882c7626 100644 (file)
@@ -509,7 +509,7 @@ ovs_refcount_ref(struct ovs_refcount *refcount)
  * in this form:
  *
  * if (ovs_refcount_unref(&object->ref_cnt) == 1) {
- *     // ...uninitialize object...
+ *     ...uninitialize object...
  *     free(object);
  * }
  *
@@ -593,7 +593,6 @@ ovs_refcount_try_ref_rcu(struct ovs_refcount *refcount)
  * For example:
  *
  * if (ovs_refcount_unref_relaxed(&object->ref_cnt) == 1) {
- *     // Schedule uninitialization and freeing of the object:
  *     ovsrcu_postpone(destructor_function, object);
  * }
  *
index c98f3052f386f44480aa821efcb7186160b5de32..564595c3a511ced1418003304c1d127c765cb122 100644 (file)
@@ -117,7 +117,7 @@ rtbsd_notifier_run(void)
         int retval;
 
         msg.ifm_type = RTM_IFINFO;
-        msg.ifm_version = RTM_VERSION; //XXX check if necessary
+        msg.ifm_version = RTM_VERSION; /* XXX Check if necessary. */
 
         /* read from PF_ROUTE socket */
         retval = read(notify_sock, (char *)&msg, sizeof(msg));
@@ -176,8 +176,8 @@ rtbsd_report_change(const struct if_msghdr *msg)
 
     COVERAGE_INC(rtbsd_changed);
 
-    change.msg_type = msg->ifm_type; //XXX
-    change.master_ifindex = 0; //XXX
+    change.msg_type = msg->ifm_type; /* XXX */
+    change.master_ifindex = 0; /* XXX */
 
     switch (msg->ifm_type) {
     case RTM_IFINFO:
index 92743c1eb4ea7a3cc53ec02b12ad484dfd38d5bf..c88b9d1c814ff51af84cf1b15c64606b6fced737 100644 (file)
--- a/lib/seq.h
+++ b/lib/seq.h
@@ -83,7 +83,7 @@
  *
  *    ovs_mutex_lock(&mutex);
  *    ovs_list_push_back(&queue, ...element...);
- *    if (ovs_list_is_singleton(&queue)) {   // The 'if' test here is optional.
+ *    if (ovs_list_is_singleton(&queue)) {   <-- The 'if' here is optional.
  *        seq_change(nonempty_seq);
  *    }
  *    ovs_mutex_unlock(&mutex);
index 09daa3c903269cc778733105e6799eaf46a23d32..6b7378de934bdf91510093e6a7538b3de4d56dd8 100644 (file)
@@ -1241,7 +1241,7 @@ sock_strerror(int error)
 #endif
 }
 \f
-#ifndef _WIN32 //Avoid using sendmsg on Windows entirely
+#ifndef _WIN32 /* Avoid using sendmsg on Windows entirely. */
 static int
 emulate_sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n,
                  unsigned int flags)
index 40298067884c5fcf74ea4673a28d64084836117b..5ea1097f95d1a7dbe232540f2f14397fd5a7374c 100644 (file)
@@ -1115,7 +1115,7 @@ dpif_ipfix_set_options(
             }
             options++;
         }
-        if (i == n_flow_exporters_options) {  // Not found.
+        if (i == n_flow_exporters_options) {  /* Not found. */
             remove_flow_exporter(di, node);
         }
     }
index 074edfc1199f25588092933e93b1035cc161a7a2..d1a87a59e47e3460fd3b9e2173ebf2acd46b8000 100644 (file)
@@ -1128,12 +1128,12 @@ struct ofproto_class {
      *         if (error) {
      *             break;
      *         }
-     *         // Do something with 'port' here (without modifying or freeing
-     *         // any of its data).
+     *         ...Do something with 'port' here (without modifying or freeing
+     *            any of its data)...
      *     }
      *     ofproto->ofproto_class->port_dump_done(ofproto, state);
      * }
-     * // 'error' is now EOF (success) or a positive errno value (failure).
+     * ...'error' is now EOF (success) or a positive errno value (failure)...
      */
     int (*port_dump_start)(const struct ofproto *ofproto, void **statep);
     int (*port_dump_next)(const struct ofproto *ofproto, void *state,