remove some unneccessary checks - thanks to Petr Uzel
This commit is contained in:
2
Makefile
2
Makefile
@@ -11,7 +11,7 @@ man8 := $(DESTDIR)/share/man/man8/
|
|||||||
all: nethogs decpcap_test
|
all: nethogs decpcap_test
|
||||||
# nethogs_testsum
|
# nethogs_testsum
|
||||||
|
|
||||||
CFLAGS=-g -Wall
|
CFLAGS=-g -Wall -Wextra
|
||||||
#CFLAGS=-O2
|
#CFLAGS=-O2
|
||||||
OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o
|
OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o
|
||||||
.PHONY: tgz
|
.PHONY: tgz
|
||||||
|
|||||||
3
cui.cpp
3
cui.cpp
@@ -37,7 +37,6 @@ public:
|
|||||||
{
|
{
|
||||||
if (!ROBUST)
|
if (!ROBUST)
|
||||||
{
|
{
|
||||||
assert (uid >= 0);
|
|
||||||
assert (pid >= 0);
|
assert (pid >= 0);
|
||||||
}
|
}
|
||||||
m_name = name;
|
m_name = name;
|
||||||
@@ -48,7 +47,6 @@ public:
|
|||||||
m_uid = uid;
|
m_uid = uid;
|
||||||
if (!ROBUST)
|
if (!ROBUST)
|
||||||
{
|
{
|
||||||
assert (m_uid >= 0);
|
|
||||||
assert (m_pid >= 0);
|
assert (m_pid >= 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +86,6 @@ void Line::show (int row)
|
|||||||
{
|
{
|
||||||
if (!ROBUST)
|
if (!ROBUST)
|
||||||
{
|
{
|
||||||
assert (m_uid >= 0);
|
|
||||||
assert (m_pid >= 0);
|
assert (m_pid >= 0);
|
||||||
assert (m_pid <= 100000);
|
assert (m_pid <= 100000);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ public:
|
|||||||
void check () {
|
void check () {
|
||||||
if (!ROBUST) {
|
if (!ROBUST) {
|
||||||
assert (pid >= 0);
|
assert (pid >= 0);
|
||||||
assert (uid >= 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +90,6 @@ public:
|
|||||||
|
|
||||||
void setUid(uid_t m_uid)
|
void setUid(uid_t m_uid)
|
||||||
{
|
{
|
||||||
assert (m_uid >= 0);
|
|
||||||
uid = m_uid;
|
uid = m_uid;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user