[pacman-dev] [PATCH] Fix extra commas at end of enumerator list in alpm.h
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- lib/libalpm/alpm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 48b6ba2..b34563e 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -357,7 +357,7 @@ typedef enum _pmtransevt_t { /** Files will be downloaded from a repository. * The repository's tree name is passed to the callback. */ - PM_TRANS_EVT_RETRIEVE_START, + PM_TRANS_EVT_RETRIEVE_START } pmtransevt_t; /*@}*/ @@ -368,7 +368,7 @@ typedef enum _pmtransconv_t { PM_TRANS_CONV_CONFLICT_PKG = 0x04, PM_TRANS_CONV_CORRUPTED_PKG = 0x08, PM_TRANS_CONV_LOCAL_NEWER = 0x10, - PM_TRANS_CONV_REMOVE_PKGS = 0x20, + PM_TRANS_CONV_REMOVE_PKGS = 0x20 } pmtransconv_t; /* Transaction Progress */ -- 1.6.2.4
On Mon, May 11, 2009 at 4:10 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
The thought of this one is good, but I'm not going to take it. There are two main reasons: 1. The C spec/compilers allow this, so it works as is. 2. The trailing commas have a decent purpose when it comes to patches changing an enum- it prevents false positive line changes that consist only of adding a trailing comma to a previous line.
--- lib/libalpm/alpm.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 48b6ba2..b34563e 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -357,7 +357,7 @@ typedef enum _pmtransevt_t { /** Files will be downloaded from a repository. * The repository's tree name is passed to the callback. */ - PM_TRANS_EVT_RETRIEVE_START, + PM_TRANS_EVT_RETRIEVE_START } pmtransevt_t; /*@}*/
@@ -368,7 +368,7 @@ typedef enum _pmtransconv_t { PM_TRANS_CONV_CONFLICT_PKG = 0x04, PM_TRANS_CONV_CORRUPTED_PKG = 0x08, PM_TRANS_CONV_LOCAL_NEWER = 0x10, - PM_TRANS_CONV_REMOVE_PKGS = 0x20, + PM_TRANS_CONV_REMOVE_PKGS = 0x20 } pmtransconv_t;
/* Transaction Progress */ -- 1.6.2.4
Dan McGee wrote:
On Mon, May 11, 2009 at 4:10 PM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
The thought of this one is good, but I'm not going to take it. There are two main reasons: 1. The C spec/compilers allow this, so it works as is. 2. The trailing commas have a decent purpose when it comes to patches changing an enum- it prevents false positive line changes that consist only of adding a trailing comma to a previous line.
Ok thanks for the clarification. 1) Now i read about it in the spec ;) 2) True, I thought of that, but I gave importance to what I thought it was std. I gotta get used to C9X, I am familiar with the C89 :) -- Gerardo Exequiel Pozzi ( djgera ) http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
participants (2)
-
Dan McGee
-
Gerardo Exequiel Pozzi