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

From: Pavel Machek
Date: Thu Feb 26 2004 - 16:49:05 EST


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_packet(foo);
strcpy(foo,"OK");

...we are talking 2 or 3 characters here....
Pavel


--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
-
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/