remove some unneccessary checks - thanks to Petr Uzel

This commit is contained in:
Arnout Engelen
2008-12-06 11:36:03 +00:00
parent 218e117731
commit 7b54891553
3 changed files with 1 additions and 6 deletions

View File

@@ -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

View File

@@ -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);
} }

View File

@@ -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: