tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH v2 2/2] Implement PT_GETXSTATE and PT_SETXSTATE

On Jun 6,  4:43pm, (=?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=) wrote:
-- Subject: Re: [PATCH v2 2/2] Implement PT_GETXSTATE and PT_SETXSTATE

| I presume you mean the one in ptrace_machdep_dorequest()?  I suppose it
| was there (the code is based on xmmregs in i386) to clearly scope
| variables.
| I think having something like:
|   if (foo)
|     return x;
|   {
|     ...
|   }
| would be confusing (it would look like a misplaced '{').  Do you prefer
| if I put the scope outside 'if', i.e. directly for 'case'?

Or move the variable declarations up on top "ol school way". Well, if the
language does not do it right...

| I suppose this avoids duplicating 'uio->uio_offset =3D 0'.  However, it's
| also code copied from elsewhere so I'm not sure what the original
| motivation was.

It is better style to do avoid the extra checks and duplication so I would
also fix the original :-).

Having said all of that, I don't see any of those changes are "risky" or
creating issues for the -9 branch, so I don't see a reason to delay them.


Home | Main Index | Thread Index | Old Index