Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libswsscommon.la
if DEBUG
DBGFLAGS = -ggdb -DDEBUG
else
DBGFLAGS = -g
DBGFLAGS = -g -DNDEBUG
endif

libswsscommon_la_SOURCES = \
Expand Down
7 changes: 4 additions & 3 deletions common/ipprefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define __IPPREFIX__

#include <assert.h>
#include <stdexcept>
#include "ipaddress.h"

namespace swss {
Expand All @@ -18,7 +19,7 @@ class IpPrefix
return m_ip.isV4();
}

inline const IpAddress getIp() const
inline const IpAddress& getIp() const
{
return m_ip;
}
Expand Down Expand Up @@ -50,11 +51,11 @@ class IpPrefix
ipa.ip_addr.ipv6_addr[mid] = 0xFF << left;
memset(ipa.ip_addr.ipv6_addr, 0xFF, mid);
memset(ipa.ip_addr.ipv6_addr + mid + 1, 0, 16 - mid - 1);
return ipa;
return IpAddress(ipa);
}
default:
{
assert(false);
throw std::logic_error("Invalid family");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bin_PROGRAMS = tests
if DEBUG
DBGFLAGS = -ggdb -DDEBUG
else
DBGFLAGS = -g
DBGFLAGS = -g -DNDEBUG
endif

CFLAGS_GTEST = -I $(top_srcdir)/googletest/googletest/include
Expand Down