This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] BFD support for OpenRISC
- To: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Subject: Re: [patch] BFD support for OpenRISC
- From: Andreas Jaeger <aj at suse dot de>
- Date: 07 Jan 2001 19:47:57 +0100
- Cc: binutils at sources dot redhat dot com
- References: <3A58B6CA.4E5CDE44@netinsight.se>
>>>>> Johan Rydberg writes:
> @@ -97,6 +100,7 @@
> if (pb == 0)
> {
> printf ("buffer_insert: out of buffers for FIFO %d\n", fifo);
> + dump_free_buffers();
Please follow the GNU coding standard and add a space before each
opening brace - the line should read:
dump_free_buffers ();
[...]
> @@ -145,14 +149,13 @@
> DPRINT ("Buffers: Have allocated %d buffers\n", cnt);
> }
> -void dump_free_buffers (void);
> void
> dump_free_buffers ()
> {
> register pkt_buf_t pb;
> - int i;
> -
> + int i,j;
> + j=0;
GNU Coding Standard AFAIR: a space before a comma, spaces around "=", therefore:
int i, j;
j = 0;
> printf ("Free buffers:\n");
> for (i = 0; i < NBUFFERS; i++)
> @@ -160,26 +163,44 @@
> pb = &pkt_buffers[i];
> if (pb->pb_free)
> + {
> printf ("%d ", i);
> + j++;
> + if ( j > 9 )
No space after an opening brace/before a closing brace:
if (j > 9)
> - printf ("%d(%c) ", i, pb->pb_what == BUF_QUEUE_GLINK ? 'G' : 'D');
> + printf ("%c", pb->pb_what == BUF_QUEUE_GLINK ? 'G' : pb->pb_what == BUF_QUEUE_DTM ? 'D' : 'U');
Please no lines longer than 72 characters (that might not be part of the
GNU coding standards and I'm not sure what the rule for binutils is
- for glibc it's enforced).
> --- channel.c 2000/12/20 15:08:27 1.23
> +++ channel.c 2000/12/28 13:00:19
> /* we can now released all queued buffers. */
> - dtx_free_all_buffers (lci, bk.buff);
> + if (bk.empty == 0){
The opening brace should be on a line by itself.
I stopped here for now. Could you please correct all those formatting
issues? I didn't check the code at all.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj