Re: [Kgdb-bugreport] [PATCH][3/3] Update CVS KGDB's wrt connect / detach

From: Amit S. Kale
Date: Mon Mar 01 2004 - 03:30:58 EST


On Friday 27 Feb 2004 3:15 am, Pavel Machek wrote:
> Hi!
>
> > > 3. putpacket writes the packet and waits for a '+'
> > > 4. new gdb sends a protocol initialization packet
> > > 5. putpacket reads characters in that packet hoping for an incoming '+'
> > > sending out console message packet on each incoming character
> > > 6. gdb receives and rejects each console message packet
> > >
> > > > - Remove ok_packet(), excessive, IMHO.
> > >
> > > ok_packet is better than littering "OK" all over the place.
> >
> > I disagree. If ok_packet was anything more than
> > strcpy(remcom_out_buffer, "OK") you'd be right.
>
> Amit, he's right, having function just for one strcpy only makes code
> harder to read. And it does not even save much typing...

OK. I agree that strcpy is better.

-Amit

>
> ok_packet(foo);
> strcpy(foo,"OK");
>
> ...we are talking 2 or 3 characters here....
> Pavel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/