Remove unnecessary null checks or fix potential null dereferences
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2b8bfe410e
commit
5b4ba0b0d6
1 changed files with 11 additions and 9 deletions
|
|
@ -206,9 +206,9 @@ private:
|
||||||
|
|
||||||
autodoc_l autodoc_level(String *autodoc) {
|
autodoc_l autodoc_level(String *autodoc) {
|
||||||
autodoc_l dlevel = NO_AUTODOC;
|
autodoc_l dlevel = NO_AUTODOC;
|
||||||
if (autodoc) {
|
char *c = Char(autodoc);
|
||||||
char *c = Char(autodoc);
|
if (c) {
|
||||||
if (c && isdigit(c[0])) {
|
if (isdigit(c[0])) {
|
||||||
dlevel = (autodoc_l) atoi(c);
|
dlevel = (autodoc_l) atoi(c);
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(c, "extended") == 0) {
|
if (strcmp(c, "extended") == 0) {
|
||||||
|
|
@ -495,7 +495,7 @@ private:
|
||||||
String* full_name;
|
String* full_name;
|
||||||
if ( module ) {
|
if ( module ) {
|
||||||
full_name = NewString(module);
|
full_name = NewString(module);
|
||||||
if (class_name && Len(class_name) > 0)
|
if (Len(class_name) > 0)
|
||||||
Append(full_name, "::");
|
Append(full_name, "::");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1283,13 +1283,15 @@ public:
|
||||||
}
|
}
|
||||||
m = Next(m);
|
m = Next(m);
|
||||||
}
|
}
|
||||||
if (feature == 0) {
|
if (last) {
|
||||||
feature = Copy(last);
|
if (feature == 0) {
|
||||||
|
feature = Copy(last);
|
||||||
|
}
|
||||||
|
(Char(last))[0] = (char)toupper((Char(last))[0]);
|
||||||
|
modvar = NewStringf("m%s", last);
|
||||||
}
|
}
|
||||||
(Char(last))[0] = (char)toupper((Char(last))[0]);
|
|
||||||
modvar = NewStringf("m%s", last);
|
|
||||||
Delete(modules);
|
|
||||||
}
|
}
|
||||||
|
Delete(modules);
|
||||||
}
|
}
|
||||||
Delete(mod_name);
|
Delete(mod_name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue