Patchwork [gccgo] libgo RTEMS fix

login
register
mail settings
Submitter Ian Taylor
Date July 12, 2010, 8:39 a.m.
Message ID <mcr630lt7or.fsf@google.com>
Download mbox | patch
Permalink /patch/58582/
State New
Headers show

Comments

Ian Taylor - July 12, 2010, 8:39 a.m.
This patch from Vinu Rajashekhar fixes the RTEMS code by using
assignment rather than a new variable declaration.  Committed to gccgo
branch.

Ian

Patch

Index: libgo/go/net/fd_rtems.go
===================================================================
--- libgo/go/net/fd_rtems.go	(revision 162069)
+++ libgo/go/net/fd_rtems.go	(working copy)
@@ -112,11 +112,11 @@  func (p *pollster) WaitFD(nsec int64) (f
 	for i := p.lastFd; i < p.maxFd + 1; i++ {
 		if syscall.FDIsSet(i, p.readyReadFds) {
 			flag = true
-			mode := 'r'
+			mode = 'r'
 			syscall.FDClr(i, p.readyReadFds)
 		} else if syscall.FDIsSet(i, p.readyWriteFds) {
 			flag = true
-			mode := 'w'
+			mode = 'w'
 			syscall.FDClr(i, p.readyWriteFds)
 		}
 		if flag {