Date: Sat, 24 Jul 1999 03:45:47 +1000 From: Bruce Evans <bde@zeta.org.au> To: gibbs@caspian.plutotech.com, green@FreeBSD.org Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/inetd builtins.c Message-ID: <199907231745.DAA07915@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>>green 1999/07/23 08:49:14 PDT >> >> Modified files: >> usr.sbin/inetd builtins.c >> Log: >> Ahem. Put things back a bit. I declare variables in the scope they're >> used! I don't declare every variable at the top of a function because >> that wastes stack space. I've clarified the error a bit (for if asprintf() >> filas.) > >The stack space usage is usually the same (depends on the compiler), but Good compilers normally optimise for time and allocate enough stack space at the beginning of the function, at least on i386's. This is even required for implementing alloca(). >semantically limiting the scope of the variable to just the area where it >is used is, IMO, advantageous from a maintenance standpoint. Nevertheless, it is explicitly forbidden in style(9) (except in "unusually complicated" routines). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907231745.DAA07915>