Thanks, both applied. (I can't run "make check" right now, because the automake people broke the way "make check" is being called for some weird reason. I'll have to fix that later, but both seem straightforward enough, so...)
On 01-06-13 20:20, Tuomas Räsänen wrote: > It's better to keep variables strictly inside their usage scope than in > more wider scope to avoid unintentional variable shadowing and leaking. > > Signed-off-by: Tuomas Räsänen <[email protected]> > --- > nbd-server.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/nbd-server.c b/nbd-server.c > index f3c78bd..392ed9f 100644 > --- a/nbd-server.c > +++ b/nbd-server.c > @@ -2365,7 +2365,6 @@ void serveloop(GArray* servers) { > socklen_t addrinlen=sizeof(addrin); > int i; > int max; > - int sock; > fd_set mset; > fd_set rset; > > @@ -2379,6 +2378,7 @@ void serveloop(GArray* servers) { > max=0; > FD_ZERO(&mset); > for(i=0;i<servers->len;i++) { > + int sock; > if((sock=(g_array_index(servers, SERVER, i)).socket) >= 0) { > FD_SET(sock, &mset); > max=sock>max?sock:max; > -- This end should point toward the ground if you want to go to space. If it starts pointing toward space you are having a bad problem and you will not go to space today. -- http://xkcd.com/1133/ ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
