code style: fix inconsistent NULL pointer comparisons
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
07ca3eb9f8
commit
95a3eb5a7d
12 changed files with 216 additions and 219 deletions
|
|
@ -1206,7 +1206,7 @@ public:
|
|||
}
|
||||
if (!pname_cstr) {
|
||||
// Unnamed parameter, e.g. int foo(int);
|
||||
} else if (pname == NULL) {
|
||||
} else if (!pname) {
|
||||
pname = NewString(pname_cstr);
|
||||
} else {
|
||||
size_t len = strlen(pname_cstr);
|
||||
|
|
@ -1290,7 +1290,7 @@ public:
|
|||
if (errno || *p) {
|
||||
Clear(value);
|
||||
Append(value, "?");
|
||||
} else if (strchr(Char(value), '.') == NULL) {
|
||||
} else if (strchr(Char(value), '.') == 0) {
|
||||
// Ensure value is a double constant, not an integer one.
|
||||
Append(value, ".0");
|
||||
double val2 = strtod(Char(value), &p);
|
||||
|
|
@ -2496,7 +2496,7 @@ done:
|
|||
idx = 0;
|
||||
p = l;
|
||||
int use_parse = 0;
|
||||
while (p != NULL) {
|
||||
while (p) {
|
||||
if (checkAttribute(p, "tmap:in:numinputs", "0")) {
|
||||
p = Getattr(p, "tmap:in:next");
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue