[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Myserver-commit] [2736] Method refactoring
From: |
Giuseppe Scrivano |
Subject: |
[Myserver-commit] [2736] Method refactoring |
Date: |
Tue, 05 Aug 2008 18:34:50 +0000 |
Revision: 2736
http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=2736
Author: gscrivano
Date: 2008-08-05 18:34:49 +0000 (Tue, 05 Aug 2008)
Log Message:
-----------
Method refactoring
Modified Paths:
--------------
trunk/myserver/src/security.cpp
Modified: trunk/myserver/src/security.cpp
===================================================================
--- trunk/myserver/src/security.cpp 2008-08-03 16:16:29 UTC (rev 2735)
+++ trunk/myserver/src/security.cpp 2008-08-05 18:34:49 UTC (rev 2736)
@@ -67,7 +67,7 @@
ostringstream permissionsFile;
XmlParser localParser;
xmlDocPtr doc;
- int found = 0;
+ bool found = 0;
out.assign("");
if(parser == 0)
{
@@ -111,31 +111,25 @@
if(!xmlStrcmp(attr->name, (const xmlChar *)"FILE"))
{
fileName = (char*)attr->children->content;
-
- /* The error ID is correct. */
- if(found)
- {
- out.assign(fileName);
- }
}
- if(!xmlStrcmp(attr->name, (const xmlChar *)"ID"))
+ else if(!xmlStrcmp(attr->name, (const xmlChar *)"ID"))
{
int errorId;
errorId = atoi((const char*)attr->children->content);
if(errorId == error)
- found = 1;
+ found = true;
else
- continue;
- /* The file name was still specified. */
- if(fileName)
- {
- out.assign(fileName);
- }
+ break;
}
attr = attr->next;
}
+
+ /* The error ID is correct. */
if(found)
+ {
+ out.assign(fileName);
break;
+ }
}
node = node->next;
}
@@ -301,10 +295,10 @@
{
if(!xmlStrcmp(node2->name, (const xmlChar *)"ACTION"))
{
- if(actionsFound < 2)
+ if(actionsFound < 2)
{
tmpActionsFound = 2;
- tmpActionsNode = node->children;
+ tmpActionsNode = node->children;
}
}
node2 = node2->next;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Myserver-commit] [2736] Method refactoring,
Giuseppe Scrivano <=