@@ -401,25 +401,23 @@ func (runner *runner) restoreInternal(args []string, data []byte, flush FlushFla
401
401
func iptablesSaveCommand (protocol Protocol ) string {
402
402
if protocol == ProtocolIpv6 {
403
403
return cmdIP6TablesSave
404
- } else {
405
- return cmdIPTablesSave
406
404
}
405
+ return cmdIPTablesSave
407
406
}
408
407
409
408
func iptablesRestoreCommand (protocol Protocol ) string {
410
409
if protocol == ProtocolIpv6 {
411
410
return cmdIP6TablesRestore
412
- } else {
413
- return cmdIPTablesRestore
414
411
}
412
+ return cmdIPTablesRestore
413
+
415
414
}
416
415
417
416
func iptablesCommand (protocol Protocol ) string {
418
417
if protocol == ProtocolIpv6 {
419
418
return cmdIP6Tables
420
- } else {
421
- return cmdIPTables
422
419
}
420
+ return cmdIPTables
423
421
}
424
422
425
423
func (runner * runner ) run (op operation , args []string ) ([]byte , error ) {
@@ -579,9 +577,9 @@ func getIPTablesWaitFlag(vstring string) []string {
579
577
}
580
578
if version .LessThan (minVersion ) {
581
579
return []string {WaitString }
582
- } else {
583
- return []string {WaitString , WaitSecondsValue }
584
580
}
581
+ return []string {WaitString , WaitSecondsValue }
582
+
585
583
}
586
584
587
585
// getIPTablesVersionString runs "iptables --version" to get the version string
@@ -656,9 +654,9 @@ func (runner *runner) dbusSignalHandler(bus utildbus.Connection) {
656
654
switch s .Name {
657
655
case "org.freedesktop.DBus.NameOwnerChanged" :
658
656
name := s .Body [0 ].(string )
659
- new_owner := s .Body [2 ].(string )
657
+ newOwner := s .Body [2 ].(string )
660
658
661
- if name != firewalldName || len (new_owner ) == 0 {
659
+ if name != firewalldName || len (newOwner ) == 0 {
662
660
continue
663
661
}
664
662
0 commit comments