sys.stdout.write('\n')
def constify(cType, const):
- if (const and cType.endswith('*') and not cType.endswith('**')):
+ if (const
+ and cType.endswith('*') and
+ (cType == 'char **' or not cType.endswith('**'))):
return 'const %s' % cType
else:
return cType
reasons[j++] = cfm_fault_reason_to_str(reason);
}
}
- ovsrec_interface_set_cfm_fault_status(cfg, (char **) reasons, j);
+ ovsrec_interface_set_cfm_fault_status(cfg, reasons, j);
ovsrec_interface_set_cfm_flap_count(cfg, &cfm_flap_count, 1);
enum { N_IFACE_STATS = IFACE_STATS };
#undef IFACE_STAT
int64_t values[N_IFACE_STATS];
- char *keys[N_IFACE_STATS];
+ const char *keys[N_IFACE_STATS];
int n;
struct netdev_stats stats;
struct ofproto *ofproto = port->bridge->ofproto;
struct iface *iface;
struct ofproto_port_stp_stats stats;
- char *keys[3];
+ const char *keys[3];
int64_t int_values[3];
if (port_is_synthetic(port)) {
struct ofproto *ofproto = port->bridge->ofproto;
struct iface *iface;
struct ofproto_port_rstp_status status;
- char *keys[3];
+ const char *keys[3];
int64_t int_values[3];
struct smap smap;
{
struct ofproto *ofproto = m->bridge->ofproto;
uint64_t tx_packets, tx_bytes;
- char *keys[2];
+ const char *keys[2];
int64_t values[2];
size_t stat_cnt = 0;