On 02/05/2012 04:58 PM, Jérémy Compostella wrote: > All, > > Working on dd new features, I found out that a do/while statement wasn't > respecting the HACKING coding standard. > > I attached the patch which fix this.
I made a couple of meta changes: 1. Changed the tag of the commit message from dd: to maint: since this has no functional change to dd. This helps when scanning the auto generated summary of changes. 2. You inconsistently use é and e in your name between git config and your emailer and patches on github. I adjusted to using é as I presume that's more correct? 3. I removed the redundant Signed-Off line 4. I summarised the file and function where the change was made 5. I removed the debbugs email address from the CC of this mail. [email protected] is best for patches. I hope these changes don't seem pedantic. Keeping a consistent commit structure does help with ongoing maintenance. Also using a consistent format is quicker as less thinking is involved. Also tools like http://www.gnu.org/software/vc-dwim/ can be used if doing many such patches. I'll push the attached if you concur. cheers, Pádraig.
>From 31eeead93842c6581e0a9b21f6e8eb964d0c9309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= <[email protected]> Date: Sun, 5 Feb 2012 17:53:55 +0100 Subject: [PATCH] maint: add braces as requested by HACKING coding standard * src/dd.c (dd_copy): Braces were missing for this do/while statement. --- src/dd.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dd.c b/src/dd.c index 2c545c2..9d24791 100644 --- a/src/dd.c +++ b/src/dd.c @@ -1807,12 +1807,14 @@ dd_copy (void) memset (obuf, 0, output_blocksize); do - if (iwrite (STDOUT_FILENO, obuf, output_blocksize) - != output_blocksize) - { - error (0, errno, _("writing to %s"), quote (output_file)); - quit (EXIT_FAILURE); - } + { + if (iwrite (STDOUT_FILENO, obuf, output_blocksize) + != output_blocksize) + { + error (0, errno, _("writing to %s"), quote (output_file)); + quit (EXIT_FAILURE); + } + } while (--write_records != 0); } } -- 1.7.6.4
