This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: sim/arm/armos.c: IsTTY [PATCH]
It only now occurs to me to ask if you have a copyright assignment on
file with the FSF - do you? I don't see one listed. Sorry for not
catching this potential problem earlier.
On Sat, Sep 17, 2005 at 05:32:30PM -0600, Shaun Jackman wrote:
> +static int
> +ReadFileName(ARMul_State *state, char *buf, ARMword src, size_t n)
Space before the parens here.
> +{
> + struct OSblock *OSptr = (struct OSblock *) state->OSptr;
> + char *p = buf;
> +
> + while (n--)
> + if ((*p++ = ARMul_SafeReadByte (state, src++)) == '\0')
> + return 0;
> + OSptr->ErrorNo = cb_host_to_target_errno(sim_callback, ENAMETOOLONG);
> + return state->Reg[0] = -1;
I'd appreciate it if you didn't use the return value of assignment this
way; it's too easy to assume a typo.
> + if (ReadFileName(state, buf, path, sizeof buf) != -1)
> + {
Space before parens, braces get indented.
> + if (ReadFileName(state, oldbuf, old, sizeof oldbuf) != -1 &&
> + ReadFileName(state, newbuf, new, sizeof newbuf) != -1)
And operators go at the beginning of the line. Looks odd at first, but
you get used to it.
--
Daniel Jacobowitz
CodeSourcery, LLC