summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kmyfirewall/kmyfirewall-3.5.13-fix_gcc47_compilation.patch
blob: 4daf67e9baf60905b9153db83f4799501f7ff989 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--- ./kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp.orig	2012-05-02 04:58:04.051212974 -0400
+++ ./kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp	2012-05-02 05:07:11.093803088 -0400
@@ -305,14 +305,15 @@
 	if ( m_zone && ! m_host ) {
 		if ( onOff ) {
 			m_protocolUsage = 0;
-			if ( KMFProtocolUsage* pro = m_zone->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
+			KMFProtocolUsage* pro;
+			if ( pro = m_zone->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
 				m_protocolUsage = pro;
 			} else { 
 					KMFUndoEngine::instance()->startTransaction(
 					m_zone,
 					i18n("Add protocol %1 to zone %2.").tqarg( protUsage->protocol()->name() ).tqarg( m_zone->guiName() )
 					);
-					KMFProtocolUsage * pro = m_zone->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol()->getDOMTree() );
+					pro = m_zone->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol()->getDOMTree() );
 			
 				if ( pro ) {
 					kdDebug() << "Added Protocol to zone: " << m_zone-> name()  << endl;
@@ -341,15 +342,16 @@
 	} else if ( m_host ) {
 		if ( onOff ) {
 			m_protocolUsage = 0;
+			KMFProtocolUsage* pro;
 			
-				if ( KMFProtocolUsage* pro = m_host->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
+				if ( pro = m_host->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
 				m_protocolUsage = pro;
 			} else {
 				KMFUndoEngine::instance()->startTransaction(
 					m_host,
 					i18n("Add protocol %1 to host %2.").tqarg( protUsage->protocol()->name() ).tqarg( m_host->guiName() )
 					);
-					KMFProtocolUsage * pro = m_host->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol() ->getDOMTree() );
+					pro = m_host->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol() ->getDOMTree() );
 			
 				if ( pro ) {
 					kdDebug() << "Added Protocol to host: " << m_host-> name()  << endl;