Rename NOT_REACHED to OVS_NOT_REACHED
authorHarold Lim <haroldl@vmware.com>
Tue, 17 Dec 2013 18:32:12 +0000 (10:32 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 17 Dec 2013 21:16:39 +0000 (13:16 -0800)
This allows other libraries to use util.h that has already
defined NOT_REACHED.

Signed-off-by: Harold Lim <haroldl@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
55 files changed:
CodingStyle
lib/async-append-null.c
lib/bfd.c
lib/bundle.c
lib/cfm.c
lib/daemon.c
lib/dpif-linux.c
lib/dpif.c
lib/fatal-signal.c
lib/flow.c
lib/json.c
lib/lacp.c
lib/meta-flow.c
lib/multipath.c
lib/netlink.c
lib/odp-execute.c
lib/odp-util.c
lib/ofp-actions.c
lib/ofp-msgs.c
lib/ofp-parse.c
lib/ofp-print.c
lib/ofp-util.c
lib/ofpbuf.c
lib/ovsdb-data.c
lib/ovsdb-idl.c
lib/ovsdb-types.c
lib/pcap-file.c
lib/rconn.c
lib/reconnect.c
lib/stp.c
lib/stream-fd.c
lib/stream-ssl.c
lib/stream.c
lib/util.c
lib/util.h
lib/vconn-stream.c
lib/vconn.c
ofproto/bond.c
ofproto/connmgr.c
ofproto/ofproto-dpif-upcall.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c
ofproto/ofproto.c
ovsdb/condition.c
ovsdb/log.c
ovsdb/mutation.c
tests/test-classifier.c
tests/test-heap.c
tests/test-multipath.c
tests/test-reconnect.c
utilities/ovs-appctl.c
utilities/ovs-ofctl.c
utilities/ovs-vlan-bug-workaround.c
utilities/ovs-vsctl.c
vtep/vtep-ctl.c

index c6e1a61..6ac0316 100644 (file)
@@ -224,7 +224,7 @@ statement, that is, write "return 0;" and not "return(0);"
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
   "switch" statements with very short, uniform cases may use an
index 3eef26e..217997b 100644 (file)
@@ -41,11 +41,11 @@ void
 async_append_write(struct async_append *ap OVS_UNUSED,
                    const void *data OVS_UNUSED, size_t size OVS_UNUSED)
 {
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 void
 async_append_flush(struct async_append *ap OVS_UNUSED)
 {
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
index 5ac20d6..69b4f0e 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -798,7 +798,7 @@ bfd_process_packet(struct bfd *bfd, const struct flow *flow,
             break;
         case STATE_ADMIN_DOWN:
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
     /* XXX: RFC 5880 Section 6.8.6 Demand mode related calculations here. */
index 9aec8c9..4a40a6a 100644 (file)
@@ -99,7 +99,7 @@ bundle_execute(const struct ofpact_bundle *bundle,
         return execute_ab(bundle, slave_enabled, aux);
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 18a3750..5ee94d5 100644 (file)
--- a/lib/cfm.c
+++ b/lib/cfm.c
@@ -236,7 +236,7 @@ static int
 ccm_interval_to_ms(uint8_t interval)
 {
     switch (interval) {
-    case 0:  NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
+    case 0:  OVS_NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
     case 1:  return 3;      /* Not recommended due to timer resolution. */
     case 2:  return 10;     /* Not recommended due to timer resolution. */
     case 3:  return 100;
@@ -244,10 +244,10 @@ ccm_interval_to_ms(uint8_t interval)
     case 5:  return 10000;
     case 6:  return 60000;
     case 7:  return 600000;
-    default: NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
+    default: OVS_NOT_REACHED(); /* Explicitly not supported by 802.1ag. */
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static long long int
index 54641d0..5ed2895 100644 (file)
@@ -341,7 +341,7 @@ fork_and_wait_for_startup(int *fdp)
             } else if (retval < 0) {
                 VLOG_FATAL("waitpid failed (%s)", ovs_strerror(errno));
             } else {
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
         }
         close(fds[0]);
index 8fa42a9..d75bc95 100644 (file)
@@ -1192,7 +1192,7 @@ dpif_linux_operate__(struct dpif *dpif_, struct dpif_op **ops, size_t n_ops)
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -1253,7 +1253,7 @@ dpif_linux_operate__(struct dpif *dpif_, struct dpif_op **ops, size_t n_ops)
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         ofpbuf_uninit(&aux->request);
index 270e641..7220b38 100644 (file)
@@ -1276,7 +1276,7 @@ dpif_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
                 break;
 
             default:
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
         }
     }
index e980f4b..b1a0341 100644 (file)
@@ -174,7 +174,7 @@ fatal_signal_run(void)
         raise(sig_nr);
 
         ovs_mutex_unlock(&mutex);
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 8f80f88..13d0aa5 100644 (file)
@@ -940,7 +940,7 @@ flow_mask_hash_fields(const struct flow *flow, struct flow_wildcards *wc,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -958,7 +958,7 @@ flow_hash_fields(const struct flow *flow, enum nx_hash_fields fields,
         return flow_hash_symmetric_l4(flow, basis);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Returns a string representation of 'fields'. */
index 56dc5ef..db0e09e 100644 (file)
@@ -355,7 +355,7 @@ json_destroy(struct json *json)
             break;
 
         case JSON_N_TYPES:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
         free(json);
     }
@@ -417,7 +417,7 @@ json_clone(const struct json *json)
 
     case JSON_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -502,7 +502,7 @@ json_hash(const struct json *json, size_t basis)
 
     case JSON_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -573,7 +573,7 @@ json_equal(const struct json *a, const struct json *b)
 
     case JSON_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
@@ -1175,7 +1175,7 @@ json_parser_put_value(struct json_parser *p, struct json *value)
     } else if (node->json->type == JSON_ARRAY) {
         json_array_add(node->json, value);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1295,7 +1295,7 @@ json_parser_pop(struct json_parser *p)
         } else if (node->json->type == JSON_OBJECT) {
             p->parse_state = JSON_PARSE_OBJECT_NEXT;
         } else {
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 }
@@ -1502,7 +1502,7 @@ json_serialize(const struct json *json, struct json_serializer *s)
 
     case JSON_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1750,6 +1750,6 @@ json_serialized_length(const struct json *json)
 
     case JSON_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
index 07f1e10..9eec1f9 100644 (file)
@@ -905,7 +905,7 @@ lacp_print_details(struct ds *ds, struct lacp *lacp) OVS_REQUIRES(mutex)
             status = "defaulted";
             break;
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         ds_put_format(ds, "\nslave: %s: %s %s\n", slave->name, status,
index cd121bb..96e0efe 100644 (file)
@@ -985,7 +985,7 @@ mf_is_all_wild(const struct mf_field *mf, const struct flow_wildcards *wc)
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1016,7 +1016,7 @@ mf_is_mask_valid(const struct mf_field *mf, const union mf_value *mask)
         return true;
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static bool
@@ -1081,7 +1081,7 @@ mf_are_prereqs_ok(const struct mf_field *mf, const struct flow *flow)
                 && (flow->tp_src == htons(ND_NEIGHBOR_ADVERT)));
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Set field and it's prerequisities in the mask.
@@ -1220,7 +1220,7 @@ mf_is_value_valid(const struct mf_field *mf, const union mf_value *value)
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1411,7 +1411,7 @@ mf_get_value(const struct mf_field *mf, const struct flow *flow,
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1607,7 +1607,7 @@ mf_set_value(const struct mf_field *mf,
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1823,7 +1823,7 @@ mf_set_flow_value(const struct mf_field *mf,
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -2031,7 +2031,7 @@ mf_set_wild(const struct mf_field *mf, struct match *match)
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -2199,7 +2199,7 @@ mf_set(const struct mf_field *mf,
 
     case MFF_N_IDS:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return mf->usable_protocols_bitwise;
@@ -2673,7 +2673,7 @@ mf_parse(const struct mf_field *mf, const char *s,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (!error && !mf_is_mask_valid(mf, mask)) {
@@ -2827,7 +2827,7 @@ mf_format(const struct mf_field *mf,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
index d611008..a6f549c 100644 (file)
@@ -189,7 +189,7 @@ multipath_algorithm(uint32_t hash, enum nx_mp_algorithm algorithm,
         return algorithm_iter_hash(hash, n_links, arg);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 \f
 /* Parses 's_' as a set of arguments to the "multipath" action and initializes
index aea1f29..ada429e 100644 (file)
@@ -643,7 +643,7 @@ min_attr_len(enum nl_attr_type type)
     case NL_A_STRING: return 1;
     case NL_A_FLAG: return 0;
     case NL_A_NESTED: return 0;
-    case N_NL_ATTR_TYPES: default: NOT_REACHED();
+    case N_NL_ATTR_TYPES: default: OVS_NOT_REACHED();
     }
 }
 
@@ -661,7 +661,7 @@ max_attr_len(enum nl_attr_type type)
     case NL_A_STRING: return SIZE_MAX;
     case NL_A_FLAG: return SIZE_MAX;
     case NL_A_NESTED: return SIZE_MAX;
-    case N_NL_ATTR_TYPES: default: NOT_REACHED();
+    case N_NL_ATTR_TYPES: default: OVS_NOT_REACHED();
     }
 }
 
index 5f5b13b..2487118 100644 (file)
@@ -134,7 +134,7 @@ odp_execute_set_action(struct ofpbuf *packet, const struct nlattr *a,
     case OVS_KEY_ATTR_TCP_FLAGS:
     case __OVS_KEY_ATTR_MAX:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -170,7 +170,7 @@ odp_execute_sample(void *dp, struct ofpbuf *packet, struct flow *key,
         case OVS_SAMPLE_ATTR_UNSPEC:
         case __OVS_SAMPLE_ATTR_MAX:
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -239,7 +239,7 @@ odp_execute_actions__(void *dp, struct ofpbuf *packet, struct flow *key,
 
         case OVS_ACTION_ATTR_UNSPEC:
         case __OVS_ACTION_ATTR_MAX:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 }
index 6dbc213..f44c7d4 100644 (file)
@@ -3383,7 +3383,7 @@ commit_mpls_action(const struct flow *flow, struct flow *base,
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     base->dl_type = flow->dl_type;
index a02f842..df7aebd 100644 (file)
@@ -324,7 +324,7 @@ decode_nxast_action(const union ofp_action *a, enum ofputil_action_code *code)
             } else {                                    \
                 return OFPERR_OFPBAC_BAD_LEN;           \
             }                                           \
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 #include "ofp-util.def"
 
     case CONSTANT_HTONS(NXAST_SNAT__OBSOLETE):
@@ -380,7 +380,7 @@ ofpact_from_nxast(const union ofp_action *a, enum ofputil_action_code code,
 #define OFPAT10_ACTION(ENUM, STRUCT, NAME) case OFPUTIL_##ENUM:
 #define OFPAT11_ACTION(ENUM, STRUCT, EXTENSIBLE, NAME) case OFPUTIL_##ENUM:
 #include "ofp-util.def"
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_NXAST_RESUBMIT:
         resubmit_from_openflow(&a->resubmit, out);
@@ -527,7 +527,7 @@ ofpact_from_openflow10(const union ofp_action *a,
     case OFPUTIL_ACTION_INVALID:
 #define OFPAT11_ACTION(ENUM, STRUCT, EXTENSIBLE, NAME) case OFPUTIL_##ENUM:
 #include "ofp-util.def"
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_OFPAT10_OUTPUT:
         return output_from_openflow10(&a->output10, out);
@@ -764,7 +764,7 @@ decode_openflow11_action(const union ofp_action *a,
             } else {                                    \
                 return OFPERR_OFPBAC_BAD_LEN;           \
             }                                           \
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 #include "ofp-util.def"
 
     default:
@@ -1087,7 +1087,7 @@ set_field_to_openflow(const struct ofpact_set_field *sf,
     } else if (oh->version == OFP10_VERSION) {
         set_field_to_openflow10(sf, openflow);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1145,7 +1145,7 @@ ofpact_from_openflow11(const union ofp_action *a, enum ofp_version version,
     case OFPUTIL_ACTION_INVALID:
 #define OFPAT10_ACTION(ENUM, STRUCT, NAME) case OFPUTIL_##ENUM:
 #include "ofp-util.def"
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_OFPAT11_OUTPUT:
         return output_from_openflow11(&a->ofp11_output, out);
@@ -1337,7 +1337,7 @@ ofpact_is_set_action(const struct ofpact *a)
     case OFPACT_WRITE_METADATA:
         return false;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1404,7 +1404,7 @@ ofpact_is_allowed_in_actions_set(const struct ofpact *a)
     case OFPACT_WRITE_METADATA:
         return false;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -2119,7 +2119,7 @@ ofpact_check__(enum ofputil_protocol *usable_protocols, struct ofpact *a,
         return 0;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -2481,7 +2481,7 @@ ofpact_to_nxast(const struct ofpact *a, struct ofpbuf *out)
     case OFPACT_GOTO_TABLE:
     case OFPACT_METER:
     case OFPACT_SET_FIELD:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
@@ -2782,7 +2782,7 @@ ofpact_to_openflow11(const struct ofpact *a, struct ofpbuf *out)
     case OFPACT_WRITE_ACTIONS:
     case OFPACT_GOTO_TABLE:
     case OFPACT_METER:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPACT_GROUP:
         ofputil_put_OFPAT11_GROUP(out)->group_id =
index 9f1b453..4f07d0e 100644 (file)
@@ -693,7 +693,7 @@ ofpraw_put__(enum ofpraw raw, uint8_t version, ovs_be32 xid,
                 nsm->subtype = htonl(hdrs->subtype);
                 memset(nsm->pad, 0, sizeof nsm->pad);
             } else {
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
         }
     } else if (version != OFP10_VERSION
@@ -714,7 +714,7 @@ ofpraw_put__(enum ofpraw raw, uint8_t version, ovs_be32 xid,
 
                 nsm->subtype = htonl(hdrs->subtype);
             } else {
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
         }
     }
@@ -757,7 +757,7 @@ ofpraw_stats_request_to_reply(enum ofpraw raw, uint8_t version)
         hdrs.type = OFPT11_STATS_REPLY;
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     error = ofpraw_from_ofphdrs(&reply_raw, &hdrs);
@@ -941,7 +941,7 @@ ofpmp_flags__(const struct ofp_header *oh)
     case OFP13_VERSION:
         return &((struct ofp11_stats_msg *) oh)->flags;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 5b07d14..6b69ecd 100644 (file)
@@ -644,7 +644,7 @@ parse_named_action(enum ofputil_action_code code,
 
     switch (code) {
     case OFPUTIL_ACTION_INVALID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_OFPAT10_OUTPUT:
     case OFPUTIL_OFPAT11_OUTPUT:
@@ -765,7 +765,7 @@ parse_named_action(enum ofputil_action_code code,
         break;
 
     case OFPUTIL_OFPAT11_DEC_NW_TTL:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_OFPAT10_SET_TP_SRC:
     case OFPUTIL_OFPAT11_SET_TP_SRC:
@@ -833,7 +833,7 @@ parse_named_action(enum ofputil_action_code code,
     case OFPUTIL_NXAST_RESUBMIT_TABLE:
     case OFPUTIL_NXAST_OUTPUT_REG:
     case OFPUTIL_NXAST_DEC_TTL_CNT_IDS:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_NXAST_LEARN:
         error = learn_parse(arg, ofpacts);
@@ -1021,7 +1021,7 @@ parse_named_instruction(enum ovs_instruction_type type,
 
     switch (type) {
     case OVSINST_OFPIT11_APPLY_ACTIONS:
-        NOT_REACHED();  /* This case is handled by str_to_inst_ofpacts() */
+        OVS_NOT_REACHED();  /* This case is handled by str_to_inst_ofpacts() */
         break;
 
     case OVSINST_OFPIT11_WRITE_ACTIONS: {
@@ -1246,7 +1246,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     match_init_catchall(&fm->match);
@@ -1500,7 +1500,7 @@ parse_ofp_meter_mod_str__(struct ofputil_meter_mod *mm, char *string,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     mm->command = command;
@@ -2146,7 +2146,7 @@ parse_ofp_group_mod_str__(struct ofputil_group_mod *gm, uint16_t command,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     memset(gm, 0, sizeof *gm);
index 13705d0..0f7278c 100644 (file)
@@ -540,7 +540,7 @@ ofp_print_switch_features(struct ds *string, const struct ofp_header *oh)
     case OFP13_VERSION:
         return; /* no ports in ofp13_switch_features */
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     ofp_print_phy_ports(string, oh->version, &b);
@@ -1789,7 +1789,7 @@ ofp_print_ofpst_table_reply(struct ds *string, const struct ofp_header *oh,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1937,7 +1937,7 @@ ofp_print_role_generic(struct ds *string, enum ofp12_controller_role role,
         ds_put_cstr(string, "slave");
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (generation_id != UINT64_MAX) {
@@ -1987,7 +1987,7 @@ ofp_print_role_status_message(struct ds *string, const struct ofp_header *oh)
         ds_put_cstr(string, "experimenter_data_changed");
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 7fc4c7c..a0a372f 100644 (file)
@@ -573,7 +573,7 @@ ofputil_match_typical_len(enum ofputil_protocol protocol)
         return NXM_TYPICAL_LEN;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -595,7 +595,7 @@ ofputil_put_ofp11_match(struct ofpbuf *b, const struct match *match,
     case OFPUTIL_P_OF10_STD_TID:
     case OFPUTIL_P_OF10_NXM:
     case OFPUTIL_P_OF10_NXM_TID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPUTIL_P_OF11_STD: {
         struct ofp11_match *om;
@@ -613,7 +613,7 @@ ofputil_put_ofp11_match(struct ofpbuf *b, const struct match *match,
         return oxm_put_match(b, match);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Given a 'dl_type' value in the format used in struct flow, returns the
@@ -715,7 +715,7 @@ ofputil_protocol_to_ofp_version(enum ofputil_protocol protocol)
         return OFP13_VERSION;
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Returns a bitmap of OpenFlow versions that are supported by at
@@ -790,7 +790,7 @@ ofputil_protocol_set_tid(enum ofputil_protocol protocol, bool enable)
         return OFPUTIL_P_OF13_OXM;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -830,7 +830,7 @@ ofputil_protocol_set_base(enum ofputil_protocol cur,
         return ofputil_protocol_set_tid(OFPUTIL_P_OF13_OXM, tid);
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -918,7 +918,7 @@ ofputil_protocols_to_string(enum ofputil_protocol protocols)
                 goto match;
             }
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     match: ;
     }
@@ -1071,7 +1071,7 @@ ofputil_version_to_string(enum ofp_version ofp_version)
     case OFP13_VERSION:
         return "OpenFlow13";
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1096,7 +1096,7 @@ ofputil_packet_in_format_to_string(enum nx_packet_in_format packet_in_format)
     case NXPIF_NXM:
         return "nxm";
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1305,11 +1305,11 @@ ofputil_encode_set_protocol(enum ofputil_protocol current,
         case OFPUTIL_P_OF13_OXM:
             /* There is only one variant of each OpenFlow 1.1+ protocol, and we
              * verified above that we're not trying to change versions. */
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 
         case OFPUTIL_P_OF10_STD_TID:
         case OFPUTIL_P_OF10_NXM_TID:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -1378,7 +1378,7 @@ ofputil_nx_flow_format_to_string(enum nx_flow_format flow_format)
     case NXFF_NXM:
         return "nxm";
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1638,7 +1638,7 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
             fm->out_group = OFPG11_ANY;
             raw_flags = nfm->flags;
         } else {
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         fm->modify_cookie = fm->new_cookie != OVS_BE64_MAX;
@@ -2161,7 +2161,7 @@ ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     ofpmsg_update_length(msg);
@@ -2286,7 +2286,7 @@ ofputil_decode_queue_get_config_request(const struct ofp_header *oh,
         return ofputil_port_from_ofp11(qgcr11->port, port);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Constructs and returns the beginning of a reply to
@@ -2325,7 +2325,7 @@ ofputil_encode_queue_get_config_reply(const struct ofp_header *oh)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return reply;
@@ -2407,7 +2407,7 @@ ofputil_decode_queue_get_config_reply(struct ofpbuf *reply, ofp_port_t *port)
         return ofputil_port_from_ofp11(qgcr11->port, port);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static enum ofperr
@@ -2543,7 +2543,7 @@ ofputil_decode_flow_stats_request(struct ofputil_flow_stats_request *fsr,
 
     default:
         /* Hey, the caller lied. */
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -2614,7 +2614,7 @@ ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return msg;
@@ -2797,7 +2797,7 @@ ofputil_decode_flow_stats_reply(struct ofputil_flow_stats *fs,
         fs->byte_count = ntohll(nfs->byte_count);
         fs->flags = 0;
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     fs->ofpacts = ofpacts->data;
@@ -2905,7 +2905,7 @@ ofputil_append_flow_stats_reply(const struct ofputil_flow_stats *fs,
         nfs->packet_count = htonll(fs->packet_count);
         nfs->byte_count = htonll(fs->byte_count);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     ofpmp_postappend(replies, start_ofs);
@@ -3034,7 +3034,7 @@ ofputil_decode_flow_removed(struct ofputil_flow_removed *fr,
         fr->packet_count = ntohll(nfr->packet_count);
         fr->byte_count = ntohll(nfr->byte_count);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return 0;
@@ -3118,7 +3118,7 @@ ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return msg;
@@ -3238,7 +3238,7 @@ ofputil_decode_packet_in(struct ofputil_packet_in *pin,
 
         ofputil_decode_packet_in_finish(pin, &match, &b);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return 0;
@@ -3420,7 +3420,7 @@ ofputil_encode_packet_in(const struct ofputil_packet_in *pin,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     ofpmsg_update_length(packet);
@@ -3516,7 +3516,7 @@ ofputil_decode_packet_out(struct ofputil_packet_out *po,
             return error;
         }
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (ofp_to_u16(po->in_port) >= ofp_to_u16(OFPP_MAX)
@@ -3665,7 +3665,7 @@ ofputil_get_phy_port_size(enum ofp_version ofp_version)
     case OFP13_VERSION:
         return sizeof(struct ofp11_port);
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -3736,7 +3736,7 @@ ofputil_put_phy_port(enum ofp_version ofp_version,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -3765,7 +3765,7 @@ ofputil_append_port_desc_stats_reply(enum ofp_version ofp_version,
     }
 
     default:
-      NOT_REACHED();
+      OVS_NOT_REACHED();
     }
 }
 \f
@@ -3956,7 +3956,7 @@ ofputil_encode_switch_features(const struct ofputil_switch_features *features,
         raw = OFPRAW_OFPT13_FEATURES_REPLY;
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     b = ofpraw_alloc_xid(raw, version, xid, 0);
     osf = ofpbuf_put_zeros(b, sizeof *osf);
@@ -3984,7 +3984,7 @@ ofputil_encode_switch_features(const struct ofputil_switch_features *features,
         }
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return b;
@@ -4057,7 +4057,7 @@ ofputil_encode_port_status(const struct ofputil_port_status *ps,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     b = ofpraw_alloc_xid(raw, version, htonl(0), 0);
@@ -4150,7 +4150,7 @@ ofputil_encode_port_mod(const struct ofputil_port_mod *pm,
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return b;
@@ -4210,7 +4210,7 @@ ofputil_encode_table_mod(const struct ofputil_table_mod *pm,
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return b;
@@ -4270,7 +4270,7 @@ ofputil_decode_role_message(const struct ofp_header *oh,
         rr->have_generation_id = false;
         rr->generation_id = 0;
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return 0;
@@ -4307,7 +4307,7 @@ ofputil_encode_role_reply(const struct ofp_header *request,
         nrr = ofpbuf_put_zeros(buf, sizeof *nrr);
         nrr->role = htonl(rr->role - 1);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return buf;
@@ -4519,7 +4519,7 @@ ofputil_encode_table_stats_reply(const struct ofp12_table_stats stats[], int n,
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -4839,7 +4839,7 @@ ofputil_encode_packet_out(const struct ofputil_packet_out *po,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (po->buffer_id == UINT32_MAX) {
@@ -4892,7 +4892,7 @@ ofputil_encode_barrier_request(enum ofp_version ofp_version)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return ofpraw_alloc(type, ofp_version, 0);
@@ -4908,7 +4908,7 @@ ofputil_frag_handling_to_string(enum ofp_config_flags flags)
     case OFPC_FRAG_NX_MATCH: return "nx-match";
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 bool
@@ -5162,7 +5162,7 @@ ofputil_pull_phy_port(enum ofp_version ofp_version, struct ofpbuf *b,
         return op ? ofputil_decode_ofp11_port(pp, op) : EOF;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -5217,7 +5217,7 @@ ofputil_put_action(enum ofputil_action_code code, struct ofpbuf *buf)
 {
     switch (code) {
     case OFPUTIL_ACTION_INVALID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
 #define OFPAT10_ACTION(ENUM, STRUCT, NAME)                  \
     case OFPUTIL_##ENUM: return ofputil_put_##ENUM(buf);
@@ -5227,7 +5227,7 @@ ofputil_put_action(enum ofputil_action_code code, struct ofpbuf *buf)
     case OFPUTIL_##ENUM: return ofputil_put_##ENUM(buf);
 #include "ofp-util.def"
     }
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 #define OFPAT10_ACTION(ENUM, STRUCT, NAME)                        \
@@ -5497,7 +5497,7 @@ ofputil_encode_dump_ports_request(enum ofp_version ofp_version, ofp_port_t port)
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return request;
@@ -5581,7 +5581,7 @@ ofputil_append_port_stat(struct list *replies,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -5663,7 +5663,7 @@ ofputil_get_port_stats_size(enum ofp_version ofp_version)
     case OFP13_VERSION:
         return sizeof(struct ofp13_port_stats);
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -5730,7 +5730,7 @@ ofputil_decode_port_stats(struct ofputil_port_stats *ps, struct ofpbuf *msg)
         }
         return ofputil_port_stats_from_ofp10(ps, ps10);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
  bad_len:
@@ -5761,7 +5761,7 @@ ofputil_decode_port_stats_request(const struct ofp_header *request,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -5803,7 +5803,7 @@ ofputil_encode_group_stats_request(enum ofp_version ofp_version,
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return request;
@@ -5831,7 +5831,7 @@ ofputil_encode_group_desc_request(enum ofp_version ofp_version)
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return request;
@@ -5901,7 +5901,7 @@ ofputil_append_group_stats(struct list *replies,
 
     case OFP10_VERSION:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -5924,7 +5924,7 @@ ofputil_encode_group_features_request(enum ofp_version ofp_version)
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return request;
@@ -6040,7 +6040,7 @@ ofputil_decode_group_stats_reply(struct ofpbuf *msg,
             ogs11 = NULL;
         }
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (!ogs11) {
@@ -6277,7 +6277,7 @@ ofputil_encode_group_mod(enum ofp_version ofp_version,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return b;
@@ -6323,7 +6323,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
             }
             break;
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -6357,7 +6357,7 @@ ofputil_decode_queue_stats_request(const struct ofp_header *request,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -6392,7 +6392,7 @@ ofputil_encode_queue_stats_request(enum ofp_version ofp_version,
         break;
     }
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return request;
@@ -6410,7 +6410,7 @@ ofputil_get_queue_stats_size(enum ofp_version ofp_version)
     case OFP13_VERSION:
         return sizeof(struct ofp13_queue_stats);
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -6524,7 +6524,7 @@ ofputil_decode_queue_stats(struct ofputil_queue_stats *qs, struct ofpbuf *msg)
         }
         return ofputil_queue_stats_from_ofp10(qs, qs10);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
  bad_len:
@@ -6599,6 +6599,6 @@ ofputil_append_queue_stat(struct list *replies,
     }
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
index 1b18b14..82940eb 100644 (file)
@@ -276,7 +276,7 @@ ofpbuf_resize__(struct ofpbuf *b, size_t new_headroom, size_t new_tailroom)
         break;
 
     case OFPBUF_STACK:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OFPBUF_STUB:
         b->source = OFPBUF_MALLOC;
@@ -285,7 +285,7 @@ ofpbuf_resize__(struct ofpbuf *b, size_t new_headroom, size_t new_tailroom)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     b->allocated = new_allocated;
index 4e918a6..b4b28db 100644 (file)
@@ -58,7 +58,7 @@ ovsdb_atom_init_default(union ovsdb_atom *atom, enum ovsdb_atomic_type type)
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         atom->integer = 0;
@@ -82,7 +82,7 @@ ovsdb_atom_init_default(union ovsdb_atom *atom, enum ovsdb_atomic_type type)
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -123,7 +123,7 @@ ovsdb_atom_is_default(const union ovsdb_atom *atom,
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         return atom->integer == 0;
@@ -142,7 +142,7 @@ ovsdb_atom_is_default(const union ovsdb_atom *atom,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -156,7 +156,7 @@ ovsdb_atom_clone(union ovsdb_atom *new, const union ovsdb_atom *old,
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         new->integer = old->integer;
@@ -180,7 +180,7 @@ ovsdb_atom_clone(union ovsdb_atom *new, const union ovsdb_atom *old,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -201,7 +201,7 @@ ovsdb_atom_hash(const union ovsdb_atom *atom, enum ovsdb_atomic_type type,
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         return hash_int(atom->integer, basis);
@@ -220,7 +220,7 @@ ovsdb_atom_hash(const union ovsdb_atom *atom, enum ovsdb_atomic_type type,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -233,7 +233,7 @@ ovsdb_atom_compare_3way(const union ovsdb_atom *a,
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         return a->integer < b->integer ? -1 : a->integer > b->integer;
@@ -252,7 +252,7 @@ ovsdb_atom_compare_3way(const union ovsdb_atom *a,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -353,7 +353,7 @@ ovsdb_atom_from_json__(union ovsdb_atom *atom,
 
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         if (json->type == JSON_INTEGER) {
@@ -394,7 +394,7 @@ ovsdb_atom_from_json__(union ovsdb_atom *atom,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return ovsdb_syntax_error(json, NULL, "expected %s",
@@ -443,7 +443,7 @@ ovsdb_atom_to_json(const union ovsdb_atom *atom, enum ovsdb_atomic_type type)
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         return json_integer_create(atom->integer);
@@ -463,7 +463,7 @@ ovsdb_atom_to_json(const union ovsdb_atom *atom, enum ovsdb_atomic_type type)
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -476,7 +476,7 @@ ovsdb_atom_json_length(const union ovsdb_atom *atom,
 
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         json.type = JSON_INTEGER;
@@ -502,7 +502,7 @@ ovsdb_atom_json_length(const union ovsdb_atom *atom,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return json_serialized_length(&json);
@@ -517,7 +517,7 @@ ovsdb_atom_from_string__(union ovsdb_atom *atom,
 
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER: {
         long long int integer;
@@ -585,7 +585,7 @@ ovsdb_atom_from_string__(union ovsdb_atom *atom,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return NULL;
@@ -671,7 +671,7 @@ ovsdb_atom_to_string(const union ovsdb_atom *atom, enum ovsdb_atomic_type type,
 {
     switch (type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         ds_put_format(out, "%"PRId64, atom->integer);
@@ -703,7 +703,7 @@ ovsdb_atom_to_string(const union ovsdb_atom *atom, enum ovsdb_atomic_type type,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -784,7 +784,7 @@ ovsdb_atom_check_constraints(const union ovsdb_atom *atom,
 
     switch (base->type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         if (atom->integer >= base->u.integer.min
@@ -809,7 +809,7 @@ ovsdb_atom_check_constraints(const union ovsdb_atom *atom,
                                "value %"PRId64,
                                atom->integer, base->u.integer.max);
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_REAL:
         if (atom->real >= base->u.real.min && atom->real <= base->u.real.max) {
@@ -836,7 +836,7 @@ ovsdb_atom_check_constraints(const union ovsdb_atom *atom,
                                DBL_DIG, atom->real,
                                DBL_DIG, base->u.real.max);
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_BOOLEAN:
         return NULL;
@@ -849,7 +849,7 @@ ovsdb_atom_check_constraints(const union ovsdb_atom *atom,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
@@ -933,7 +933,7 @@ ovsdb_datum_default(const struct ovsdb_type *type)
         }
         return d;
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1119,7 +1119,7 @@ ovsdb_datum_sort_assert(struct ovsdb_datum *datum,
 {
     struct ovsdb_error *error = ovsdb_datum_sort(datum, key_type);
     if (error) {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index a509c24..02bee75 100644 (file)
@@ -441,7 +441,7 @@ ovsdb_idl_get_mode(struct ovsdb_idl *idl,
         }
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static void
@@ -505,7 +505,7 @@ ovsdb_idl_add_table(struct ovsdb_idl *idl,
         }
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Turns off OVSDB_IDL_ALERT for 'column' in 'idl'.
index 83e6a56..8fe0d42 100644 (file)
@@ -147,10 +147,10 @@ ovsdb_base_type_init(struct ovsdb_base_type *base, enum ovsdb_atomic_type type)
         break;
 
     case OVSDB_N_TYPES:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -210,7 +210,7 @@ ovsdb_base_type_clone(struct ovsdb_base_type *dst,
 
     case OVSDB_N_TYPES:
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -239,10 +239,10 @@ ovsdb_base_type_destroy(struct ovsdb_base_type *base)
             break;
 
         case OVSDB_N_TYPES:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 }
@@ -284,7 +284,7 @@ ovsdb_base_type_has_constraints(const struct ovsdb_base_type *base)
 
     switch (base->type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         return (base->u.integer.min != INT64_MIN
@@ -304,10 +304,10 @@ ovsdb_base_type_has_constraints(const struct ovsdb_base_type *base)
         return base->u.uuid.refTableName != NULL;
 
     case OVSDB_N_TYPES:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -481,7 +481,7 @@ ovsdb_base_type_to_json(const struct ovsdb_base_type *base)
 
     switch (base->type) {
     case OVSDB_TYPE_VOID:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case OVSDB_TYPE_INTEGER:
         if (base->u.integer.min != INT64_MIN) {
@@ -530,10 +530,10 @@ ovsdb_base_type_to_json(const struct ovsdb_base_type *base)
         break;
 
     case OVSDB_N_TYPES:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return json;
index ac68716..4ba4624 100644 (file)
@@ -89,7 +89,7 @@ pcap_open(const char *file_name, const char *mode)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     return file;
 }
index 6c96fe0..599347e 100644 (file)
@@ -632,7 +632,7 @@ rconn_run(struct rconn *rc)
             STATES
 #undef STATE
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     } while (rc->state != old_state);
     ovs_mutex_unlock(&rc->mutex);
@@ -1280,7 +1280,7 @@ timeout(const struct rconn *rc)
         STATES
 #undef STATE
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index fae35b1..0a773bc 100644 (file)
@@ -532,7 +532,7 @@ reconnect_deadline__(const struct reconnect *fsm)
         return fsm->state_entered;
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 /* Assesses whether any action should be taken on 'fsm'.  The return value is
@@ -604,7 +604,7 @@ reconnect_run(struct reconnect *fsm, long long int now)
             return 0;
         }
 
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     } else {
         return 0;
     }
index 8b9d26a..8140263 100644 (file)
--- a/lib/stp.c
+++ b/lib/stp.c
@@ -668,7 +668,7 @@ stp_state_name(enum stp_state state)
     case STP_BLOCKING:
         return "blocking";
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -709,7 +709,7 @@ stp_role_name(enum stp_role role)
     case STP_ROLE_DISABLED:
         return "disabled";
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 1171f32..81c5a43 100644 (file)
@@ -125,7 +125,7 @@ fd_wait(struct stream *stream, enum stream_wait_type wait)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index f2bd513..5ef70f8 100644 (file)
@@ -189,7 +189,7 @@ want_to_poll_events(int want)
 {
     switch (want) {
     case SSL_NOTHING:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case SSL_READING:
         return POLLIN;
@@ -198,7 +198,7 @@ want_to_poll_events(int want)
         return POLLOUT;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -484,7 +484,7 @@ ssl_connect(struct stream *stream)
         }
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static void
@@ -724,7 +724,7 @@ ssl_wait(struct stream *stream, enum stream_wait_type wait)
                 break;
 
             default:
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
         }
         break;
@@ -748,7 +748,7 @@ ssl_wait(struct stream *stream, enum stream_wait_type wait)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index 0442d84..e47b00b 100644 (file)
@@ -349,7 +349,7 @@ stream_connect(struct stream *stream)
             return stream->error;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     } while (stream->state != last_state);
 
index 9f37350..984ab45 100644 (file)
@@ -67,7 +67,7 @@ ovs_assert_failure(const char *where, const char *function,
     case 0:
         VLOG_ABORT("%s: assertion %s failed in %s()",
                    where, condition, function);
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case 1:
         fprintf(stderr, "%s: assertion %s failed in %s()",
@@ -1360,7 +1360,7 @@ scan_float(const char *s, const struct scan_spec *spec, va_list *args)
     case SCAN_INTMAX_T:
     case SCAN_PTRDIFF_T:
     case SCAN_SIZE_T:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     return s;
 }
index 2fb97d2..8886a54 100644 (file)
@@ -150,7 +150,7 @@ is_pow2(uintmax_t x)
 #define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
 #endif
 
-#define NOT_REACHED() abort()
+#define OVS_NOT_REACHED() abort()
 
 /* Expands to a string that looks like "<file>:<line>", e.g. "tmp.c:10".
  *
index 027f48f..9363712 100644 (file)
@@ -281,7 +281,7 @@ vconn_stream_wait(struct vconn *vconn, enum vconn_wait_type wait)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 \f
index 2a83eda..0dc8561 100644 (file)
@@ -596,7 +596,7 @@ vconn_connect(struct vconn *vconn)
             return vconn->error;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     } while (vconn->state != last_state);
 
index 01ab07c..ff050f1 100644 (file)
@@ -164,7 +164,7 @@ bond_mode_to_string(enum bond_mode balance) {
     case BM_AB:
         return "active-backup";
     }
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 \f
@@ -647,7 +647,7 @@ bond_check_admissibility(struct bond *bond, const void *slave_,
         goto out;
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 out:
     ovs_rwlock_unlock(&rwlock);
     return verdict;
@@ -1468,7 +1468,7 @@ choose_output_slave(const struct bond *bond, const struct flow *flow,
         return e->slave;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
index a062772..2350c33 100644 (file)
@@ -1966,7 +1966,7 @@ ofmonitor_report(struct connmgr *mgr, struct rule *rule,
 
     default:
     case NXFME_ABBREV:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     LIST_FOR_EACH (ofconn, node, &mgr->all_conns) {
index 53a9e82..12214d2 100644 (file)
@@ -765,7 +765,7 @@ handle_upcalls(struct udpif *udpif, struct list *upcalls)
         case BAD_UPCALL:
             break;
         case MISS_UPCALL:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         dpif_ipfix_unref(ipfix);
index 56d007c..ab81226 100644 (file)
@@ -1026,7 +1026,7 @@ input_vid_to_vlan(const struct xbundle *in_xbundle, uint16_t vid)
         return vid ? vid : in_xbundle->vlan;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1079,7 +1079,7 @@ input_vid_is_valid(uint16_t vid, struct xbundle *in_xbundle, bool warn)
         return true;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
 }
@@ -1106,7 +1106,7 @@ output_vlan_to_vid(const struct xbundle *out_xbundle, uint16_t vlan)
         return vlan == out_xbundle->vlan ? 0 : vlan;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -1988,7 +1988,7 @@ xlate_group_action__(struct xlate_ctx *ctx, struct group_dpif *group)
         xlate_ff_group(ctx, group);
         break;
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     group_dpif_release(group);
 }
@@ -3088,7 +3088,7 @@ xlate_actions__(struct xlate_in *xin, struct xlate_out *xout)
         ofpacts = actions->ofpacts;
         ofpacts_len = actions->ofpacts_len;
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     ofpbuf_use_stub(&ctx.stack, ctx.init_stack, sizeof ctx.init_stack);
@@ -3113,14 +3113,14 @@ xlate_actions__(struct xlate_in *xin, struct xlate_out *xout)
             goto out;
 
         case OFPC_FRAG_REASM:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 
         case OFPC_FRAG_NX_MATCH:
             /* Nothing to do. */
             break;
 
         case OFPC_INVALID_TTL_TO_CONTROLLER:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
index 68acb4b..55d90be 100644 (file)
@@ -1277,7 +1277,7 @@ add_internal_flow(struct ofproto_dpif *ofproto, int id,
                                   rulep)) {
         rule_dpif_unref(*rulep);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     return 0;
@@ -2496,7 +2496,7 @@ bundle_set(struct ofproto *ofproto_, void *aux,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     if (!vlan_bitmap_equal(trunks, bundle->trunks)) {
         free(bundle->trunks);
index e9bbc4d..363c050 100644 (file)
@@ -1513,7 +1513,7 @@ ofproto_run(struct ofproto *p)
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     if (time_msec() >= p->next_op_report) {
@@ -2666,7 +2666,7 @@ ofoperation_has_out_port(const struct ofoperation *op, ofp_port_t out_port)
                                       op->actions->ofpacts_len, out_port);
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static void
@@ -4722,7 +4722,7 @@ ofproto_compose_flow_refresh_update(const struct rule *rule,
          * actions, so that when the operation commits we report the change. */
         switch (op->type) {
         case OFOPERATION_ADD:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
 
         case OFOPERATION_MODIFY:
         case OFOPERATION_REPLACE:
@@ -4734,7 +4734,7 @@ ofproto_compose_flow_refresh_update(const struct rule *rule,
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
     fu.ofpacts = actions ? actions->ofpacts : NULL;
@@ -6139,7 +6139,7 @@ ofopgroup_complete(struct ofopgroup *group)
                 break;
 
             default:
-                NOT_REACHED();
+                OVS_NOT_REACHED();
             }
 
             ofmonitor_report(ofproto->connmgr, rule, event_type,
@@ -6208,7 +6208,7 @@ ofopgroup_complete(struct ofopgroup *group)
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         ofoperation_destroy(op);
index 760dd13..8e67c88 100644 (file)
@@ -258,11 +258,11 @@ ovsdb_clause_evaluate(const struct ovsdb_row *row,
         case OVSDB_F_LE:
         case OVSDB_F_GE:
         case OVSDB_F_GT:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 bool
index ed72ca4..807b983 100644 (file)
@@ -102,7 +102,7 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode,
             flags = O_RDWR | O_CREAT | O_EXCL;
         }
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     fd = open(name, flags, 0666);
     if (fd < 0) {
index 5fd983a..967ad15 100644 (file)
@@ -150,7 +150,7 @@ ovsdb_mutation_from_json(const struct ovsdb_table_schema *ts,
         break;
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
 exit:
@@ -306,7 +306,7 @@ mutate_scalar(const struct ovsdb_type *dst_type, struct ovsdb_datum *dst,
             }
         }
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     for (i = 0; i < dst->n; i++) {
@@ -387,7 +387,7 @@ ovsdb_mutation_set_execute(struct ovsdb_row *row,
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
         if (error) {
             return error;
index 7555feb..93a2dc1 100644 (file)
@@ -191,7 +191,7 @@ tcls_remove(struct tcls *cls, const struct test_rule *rule)
             return;
         }
     }
-    NOT_REACHED();
+    OVS_NOT_REACHED();
 }
 
 static bool
@@ -245,7 +245,7 @@ match(const struct cls_rule *wild_, const struct flow *fixed)
                     ^ wild.flow.in_port.ofp_port)
                    & wild.wc.masks.in_port.ofp_port);
         } else {
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
 
         if (!eq) {
@@ -558,7 +558,7 @@ make_rule(int wc_fields, unsigned int priority, int value_pat)
         } else if (f_idx == CLS_F_IDX_IN_PORT) {
             match.wc.masks.in_port.ofp_port = u16_to_ofp(UINT16_MAX);
         } else {
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
@@ -1113,7 +1113,7 @@ next_random_flow(struct flow *flow, unsigned int idx)
                 }
             }
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     /* 16 randomly chosen flows with N >= 3 nonzero values. */
index dd5aaa9..ccb1484 100644 (file)
@@ -221,7 +221,7 @@ test_insert_delete__(struct element *elements,
                 goto found;
             }
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     found:
         heap_remove(&heap, &element->heap_node);
@@ -260,7 +260,7 @@ test_insert_delete_raw__(struct element *elements,
                 goto found;
             }
         }
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     found:
         heap_raw_remove(&heap, &element->heap_node);
index bf879c7..7a89779 100644 (file)
@@ -128,7 +128,7 @@ main(int argc, char *argv[])
             break;
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
index 020ae48..9d1897f 100644 (file)
@@ -166,7 +166,7 @@ do_run(int argc, char *argv[])
     switch (action) {
     default:
         if (action != 0) {
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
         break;
 
index ddeeb1d..9fd0234 100644 (file)
@@ -69,7 +69,7 @@ main(int argc, char *argv[])
     } else if (cmd_result) {
         fputs(cmd_result, stdout);
     } else {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 
     jsonrpc_close(client);
@@ -161,7 +161,7 @@ parse_command_line(int argc, char *argv[])
             exit(EXIT_FAILURE);
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
index c481210..c35e15b 100644 (file)
@@ -1539,7 +1539,7 @@ ofctl_monitor(int argc, char *argv[])
         case OFP13_VERSION:
             break;
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
 
index 8688f61..88fb2b1 100644 (file)
@@ -138,7 +138,7 @@ parse_options(int argc, char *argv[])
             exit(EXIT_FAILURE);
 
         default:
-            NOT_REACHED();
+            OVS_NOT_REACHED();
         }
     }
     free(short_options);
index 0527885..528b40c 100644 (file)
@@ -3630,7 +3630,7 @@ post_create(struct vsctl_context *ctx)
     struct uuid dummy;
 
     if (!uuid_from_string(&dummy, ds_cstr(&ctx->output))) {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     real = ovsdb_idl_txn_get_insert_uuid(ctx->txn, &dummy);
     if (real) {
@@ -3748,7 +3748,7 @@ evaluate_relop(const struct ovsdb_datum *a, const struct ovsdb_datum *b,
         return ovsdb_datum_includes_all(b, a, type);
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -4058,7 +4058,7 @@ do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands,
     switch (status) {
     case TXN_UNCOMMITTED:
     case TXN_INCOMPLETE:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case TXN_ABORTED:
         /* Should not happen--we never call ovsdb_idl_txn_abort(). */
@@ -4079,7 +4079,7 @@ do_vsctl(const char *args, struct vsctl_command *commands, size_t n_commands,
         vsctl_fatal("database not locked");
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     free(error);
 
index 7b904f6..233367b 100644 (file)
@@ -3324,7 +3324,7 @@ post_create(struct vtep_ctl_context *ctx)
     struct uuid dummy;
 
     if (!uuid_from_string(&dummy, ds_cstr(&ctx->output))) {
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     real = ovsdb_idl_txn_get_insert_uuid(ctx->txn, &dummy);
     if (real) {
@@ -3441,7 +3441,7 @@ evaluate_relop(const struct ovsdb_datum *a, const struct ovsdb_datum *b,
         return ovsdb_datum_includes_all(b, a, type);
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
 }
 
@@ -3739,7 +3739,7 @@ do_vtep_ctl(const char *args, struct vtep_ctl_command *commands,
     switch (status) {
     case TXN_UNCOMMITTED:
     case TXN_INCOMPLETE:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
 
     case TXN_ABORTED:
         /* Should not happen--we never call ovsdb_idl_txn_abort(). */
@@ -3760,7 +3760,7 @@ do_vtep_ctl(const char *args, struct vtep_ctl_command *commands,
         vtep_ctl_fatal("database not locked");
 
     default:
-        NOT_REACHED();
+        OVS_NOT_REACHED();
     }
     free(error);