From: Ben Pfaff Date: Mon, 28 Mar 2011 17:48:36 +0000 (-0700) Subject: ovsdb-types: Fix bug in ovsdb_base_type_is_ref(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=219c9a73dc5bdff5c1350cc1b9cc10e405fefed2;p=openvswitch ovsdb-types: Fix bug in ovsdb_base_type_is_ref(). This function only worked properly inside OVSDB itself, because that is the only place where the 'refTable' member of ovsdb_base_type is set. Both inside and outside OVSDB, 'refTableName' is set for reference types, so it's better to check for that. This doesn't fix any existing bug because this function was only used inside OVSDB until now. --- diff --git a/lib/ovsdb-types.h b/lib/ovsdb-types.h index 6903aa83..e852391c 100644 --- a/lib/ovsdb-types.h +++ b/lib/ovsdb-types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010 Nicira Networks +/* Copyright (c) 2009, 2010, 2011 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -174,7 +174,7 @@ ovsdb_atomic_type_is_valid(enum ovsdb_atomic_type atomic_type) static inline bool ovsdb_base_type_is_ref(const struct ovsdb_base_type *base) { - return base->type == OVSDB_TYPE_UUID && base->u.uuid.refTable; + return base->type == OVSDB_TYPE_UUID && base->u.uuid.refTableName; } static inline bool