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>
*
* 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) { \
* 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
*
* 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. */
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));
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);
* in this form:
*
* if (ovs_refcount_unref(&object->ref_cnt) == 1) {
- * // ...uninitialize object...
+ * ...uninitialize object...
* free(object);
* }
*
* For example:
*
* if (ovs_refcount_unref_relaxed(&object->ref_cnt) == 1) {
- * // Schedule uninitialization and freeing of the object:
* ovsrcu_postpone(destructor_function, object);
* }
*
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));
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:
*
* 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);
#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)
}
options++;
}
- if (i == n_flow_exporters_options) { // Not found.
+ if (i == n_flow_exporters_options) { /* Not found. */
remove_flow_exporter(di, node);
}
}
* 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,