From 7b54891553ef0763b19d675cc0a29ae2b6174125 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 6 Dec 2008 11:36:03 +0000 Subject: [PATCH] remove some unneccessary checks - thanks to Petr Uzel --- Makefile | 2 +- cui.cpp | 3 --- process.h | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f732ea0..236ce15 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ man8 := $(DESTDIR)/share/man/man8/ all: nethogs decpcap_test # nethogs_testsum -CFLAGS=-g -Wall +CFLAGS=-g -Wall -Wextra #CFLAGS=-O2 OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o .PHONY: tgz diff --git a/cui.cpp b/cui.cpp index 8af8917..d295664 100644 --- a/cui.cpp +++ b/cui.cpp @@ -37,7 +37,6 @@ public: { if (!ROBUST) { - assert (uid >= 0); assert (pid >= 0); } m_name = name; @@ -48,7 +47,6 @@ public: m_uid = uid; if (!ROBUST) { - assert (m_uid >= 0); assert (m_pid >= 0); } } @@ -88,7 +86,6 @@ void Line::show (int row) { if (!ROBUST) { - assert (m_uid >= 0); assert (m_pid >= 0); assert (m_pid <= 100000); } diff --git a/process.h b/process.h index 2cdce4b..6c6abb2 100644 --- a/process.h +++ b/process.h @@ -65,7 +65,6 @@ public: void check () { if (!ROBUST) { assert (pid >= 0); - assert (uid >= 0); } } @@ -91,7 +90,6 @@ public: void setUid(uid_t m_uid) { - assert (m_uid >= 0); uid = m_uid; } private: