Cleanup various style issues.

This patch cleans up some style issues: no need to check that a value
is defined before freeing or deleting it, use C++ style casts, make
sure to NULL terminate strncpy(), empty() is faster than size() for
size == 0 or size >= 0 checks, re-scope some variables, etc.
This commit is contained in:
Stephen Williams
2010-04-13 21:29:15 -07:00
parent 6f9e364dab
commit 8cbff6def0
20 changed files with 67 additions and 78 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000-2002 Stephen Williams ([email protected])
* Copyright (c) 2000-2010 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@@ -140,7 +140,7 @@ NetPDelay::NetPDelay(NetExpr*d, NetProc*st)
NetPDelay::~NetPDelay()
{
if (expr_) delete expr_;
delete expr_;
}
uint64_t NetPDelay::delay() const