Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
c76b0321
Commit
c76b0321
authored
Aug 06, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
исправлено сравнение типов: string, указателей с NULL
parent
5a7336a6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
Element.cc
extensions/LogicProcessor/Element.cc
+2
-2
Configuration.cc
src/Various/Configuration.cc
+6
-6
MessageType.cc
src/Various/MessageType.cc
+1
-1
Restorer_XML.cc
src/Various/Restorer_XML.cc
+1
-1
UniXML.cc
src/Various/UniXML.cc
+9
-9
No files found.
extensions/LogicProcessor/Element.cc
View file @
c76b0321
...
...
@@ -29,7 +29,7 @@ void Element::addChildOut( Element* el, int num )
//
// el myid
if
(
el
->
find
(
myid
)
!=
0
)
if
(
el
->
find
(
myid
)
!=
NULL
)
{
ostringstream
msg
;
msg
<<
"("
<<
myid
<<
"): !!!
\n
"
;
...
...
@@ -74,7 +74,7 @@ Element* Element::find( ElementID id )
return
it
->
el
;
Element
*
el
(
it
->
el
->
find
(
id
)
);
if
(
el
!=
0
)
if
(
el
!=
NULL
)
return
el
;
}
...
...
src/Various/Configuration.cc
View file @
c76b0321
...
...
@@ -243,7 +243,7 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
// Init MessageInterface
{
xmlNode
*
cnode
=
unixml
.
findNode
(
unixml
.
getFirstNode
(),
"messages"
);
if
(
!
cnode
)
if
(
cnode
==
NULL
)
mi
=
new
DefaultMessageInterface
();
else
{
...
...
@@ -713,7 +713,7 @@ void Configuration::initNode( UniSetTypes::NodeInfo& ninfo, UniXML_iterator& it
string
Configuration
::
getPropByNodeName
(
const
string
&
nodename
,
const
string
&
prop
)
{
xmlNode
*
node
=
getNode
(
nodename
);
if
(
!
node
)
if
(
node
==
NULL
)
return
""
;
return
getProp
(
node
,
prop
);
...
...
@@ -730,7 +730,7 @@ xmlNode* Configuration::initDebug( DebugStream& deb, const string& _debname )
string
debname
(
_debname
);
xmlNode
*
dnode
=
conf
->
getNode
(
_debname
);
if
(
!
dnode
)
if
(
dnode
==
NULL
)
{
deb
<<
"(Configuration)(initDebug): WARNING! "
<<
_debname
<<
endl
;
// , DebugStream
...
...
@@ -744,7 +744,7 @@ xmlNode* Configuration::initDebug( DebugStream& deb, const string& _debname )
string
no_deb
(
"--"
+
debname
+
"-no-debug"
);
for
(
int
i
=
1
;
i
<
_argc
;
i
++
)
{
if
(
!
strcmp
(
_argv
[
i
],
no_deb
.
c_str
())
)
if
(
no_deb
==
_argv
[
i
]
)
{
deb
.
addLevel
(
Debug
::
NONE
);
return
dnode
;
...
...
@@ -794,7 +794,7 @@ void Configuration::initRepSections()
{
// ֣
xmlNode
*
node
(
unixml
.
findNode
(
unixml
.
getFirstNode
(),
"RootSection"
)
);
if
(
node
==
0
)
if
(
node
==
NULL
)
{
ostringstream
msg
;
msg
<<
"Configuration(initRepSections): RootSection . "
<<
fileConfName
;
...
...
@@ -812,7 +812,7 @@ void Configuration::initRepSections()
string
Configuration
::
getRepSectionName
(
const
string
sec
,
xmlNode
*
secnode
)
{
xmlNode
*
node
=
unixml
.
findNode
(
unixml
.
getFirstNode
(),
sec
);
if
(
node
==
0
)
if
(
node
==
NULL
)
{
ostringstream
msg
;
msg
<<
"Configuration(initRepSections): "
<<
sec
<<
" . "
<<
fileConfName
;
...
...
src/Various/MessageType.cc
View file @
c76b0321
...
...
@@ -130,7 +130,7 @@ ci(ci),
threshold
(
false
),
tid
(
UniSetTypes
::
DefaultThresholdId
)
{
state
=
value
!=
0
?
true
:
false
;
state
=
value
!=
0
;
type
=
Message
::
SensorInfo
;
this
->
priority
=
priority
;
this
->
consumer
=
consumer
;
...
...
src/Various/Restorer_XML.cc
View file @
c76b0321
...
...
@@ -216,7 +216,7 @@ xmlNode* Restorer_XML::find_node( UniXML& xml, xmlNode* root,
if
(
nm
.
empty
()
)
return
it
;
if
(
xml
.
getProp
(
it
,
"name"
)
==
nm
)
if
(
xml
.
getProp
(
it
,
"name"
)
==
nm
)
return
it
;
}
}
...
...
src/Various/UniXML.cc
View file @
c76b0321
...
...
@@ -354,9 +354,9 @@ bool UniXML_iterator::goNext()
return
false
;
curNode
=
curNode
->
next
;
if
(
getName
()
==
string
(
"text"
)
)
if
(
getName
()
==
"text"
)
return
goNext
();
if
(
getName
()
==
string
(
"comment"
)
)
if
(
getName
()
==
"comment"
)
return
goNext
();
return
true
;
}
...
...
@@ -367,9 +367,9 @@ bool UniXML_iterator::goThrowNext()
if
(
!
node
)
return
false
;
curNode
=
node
;
if
(
getName
()
==
string
(
"text"
)
)
if
(
getName
()
==
"text"
)
return
goThrowNext
();
if
(
getName
()
==
string
(
"comment"
)
)
if
(
getName
()
==
"comment"
)
return
goThrowNext
();
return
true
;
}
...
...
@@ -379,9 +379,9 @@ bool UniXML_iterator::goPrev()
if
(
!
curNode
)
// || !curNode->prev )
return
false
;
curNode
=
curNode
->
prev
;
if
(
getName
()
==
string
(
"text"
)
)
if
(
getName
()
==
"text"
)
return
goPrev
();
if
(
getName
()
==
string
(
"comment"
)
)
if
(
getName
()
==
"comment"
)
return
goPrev
();
return
true
;
}
...
...
@@ -420,11 +420,11 @@ bool UniXML_iterator::goChildren()
xmlNode
*
tmp
(
curNode
);
curNode
=
curNode
->
children
;
// xmlIsBlankNode,
if
(
getName
()
==
string
(
"text"
)
)
if
(
getName
()
==
"text"
)
return
goNext
();
if
(
getName
()
==
string
(
"comment"
)
)
if
(
getName
()
==
"comment"
)
return
goNext
();
if
(
getName
()
==
string
(
""
)
)
if
(
getName
()
.
empty
(
)
)
{
curNode
=
tmp
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment