[alsa-utils,4/4] Avoid empty initializer list
diff mbox series

Message ID 20200205081221.18665-4-mforney@mforney.org
State New
Headers show
Series
  • [alsa-utils,1/4] Use __func__ instead of __FUNCTION__
Related show

Commit Message

Michael Forney Feb. 5, 2020, 8:12 a.m. UTC
To zero-initialize an object, use `{0}` instead.

Signed-off-by: Michael Forney <mforney@mforney.org>
---
 alsamixer/cli.c             | 2 +-
 amidi/amidi.c               | 2 +-
 seq/aplaymidi/aplaymidi.c   | 2 +-
 seq/aplaymidi/arecordmidi.c | 2 +-
 seq/aseqdump/aseqdump.c     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

Comments

Takashi Sakamoto Feb. 5, 2020, 10:25 a.m. UTC | #1
On Wed, Feb 05, 2020 at 12:12:21AM -0800, Michael Forney wrote:
> To zero-initialize an object, use `{0}` instead.
> 
> Signed-off-by: Michael Forney <mforney@mforney.org>
> ---
>  alsamixer/cli.c             | 2 +-
>  amidi/amidi.c               | 2 +-
>  seq/aplaymidi/aplaymidi.c   | 2 +-
>  seq/aplaymidi/arecordmidi.c | 2 +-
>  seq/aseqdump/aseqdump.c     | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
 
Good to me.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

I think it better for you to generate cover-letter (--cover-letter
option for git-send-email) when posting a batch of patches.

> diff --git a/alsamixer/cli.c b/alsamixer/cli.c
> index 3f8f52f..7468325 100644
> --- a/alsamixer/cli.c
> +++ b/alsamixer/cli.c
> @@ -58,7 +58,7 @@ static void parse_options(int argc, char *argv[])
>  		{ .name = "view", .has_arg = 1, .val = 'V' },
>  		{ .name = "no-color", .val = 'g' },
>  		{ .name = "abstraction", .has_arg = 1, .val = 'a' },
> -		{ }
> +		{ 0 }
>  	};
>  	int option;
>  	int card_index;
> diff --git a/amidi/amidi.c b/amidi/amidi.c
> index c6268e4..cde4697 100644
> --- a/amidi/amidi.c
> +++ b/amidi/amidi.c
> @@ -469,7 +469,7 @@ int main(int argc, char *argv[])
>  		{"active-sensing", 0, NULL, 'a'},
>  		{"clock", 0, NULL, 'c'},
>  		{"sysex-interval", 1, NULL, 'i'},
> -		{ }
> +		{0}
>  	};
>  	int c, err, ok = 0;
>  	int ignore_active_sensing = 1;
> diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c
> index b086e70..e8491e1 100644
> --- a/seq/aplaymidi/aplaymidi.c
> +++ b/seq/aplaymidi/aplaymidi.c
> @@ -869,7 +869,7 @@ int main(int argc, char *argv[])
>  		{"list", 0, NULL, 'l'},
>  		{"port", 1, NULL, 'p'},
>  		{"delay", 1, NULL, 'd'},
> -		{}
> +		{0}
>  	};
>  	int c;
>  	int do_list = 0;
> diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
> index 604cd0d..2034df7 100644
> --- a/seq/aplaymidi/arecordmidi.c
> +++ b/seq/aplaymidi/arecordmidi.c
> @@ -740,7 +740,7 @@ int main(int argc, char *argv[])
>  		{"metronome", 1, NULL, 'm'},
>  		{"timesig", 1, NULL, 'i'},
>  		{"num-events", 1, NULL, 'n'},
> -		{ }
> +		{0}
>  	};
>  
>  	char *filename = NULL;
> diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
> index 578e06f..44ae3bb 100644
> --- a/seq/aseqdump/aseqdump.c
> +++ b/seq/aseqdump/aseqdump.c
> @@ -357,7 +357,7 @@ int main(int argc, char *argv[])
>  		{"version", 0, NULL, 'V'},
>  		{"list", 0, NULL, 'l'},
>  		{"port", 1, NULL, 'p'},
> -		{ }
> +		{0}
>  	};
>  
>  	int do_list = 0;
> -- 
> 2.25.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Michael Forney Feb. 6, 2020, 12:02 a.m. UTC | #2
On 2020-02-05, Takashi Sakamoto <o-takashi@sakamocchi.jp> wrote:
> Good to me.

Thanks for reviewing.

> I think it better for you to generate cover-letter (--cover-letter
> option for git-send-email) when posting a batch of patches.

Sorry about that. I'll make sure to add a cover letter next time.
Takashi Sakamoto Feb. 6, 2020, 1:53 a.m. UTC | #3
On Wed, Feb 05, 2020 at 04:02:54PM -0800, Michael Forney wrote:
> On 2020-02-05, Takashi Sakamoto <o-takashi@sakamocchi.jp> wrote:
> > Good to me.
> 
> Thanks for reviewing.
> 
> > I think it better for you to generate cover-letter (--cover-letter
> > option for git-send-email) when posting a batch of patches.
> 
> Sorry about that. I'll make sure to add a cover letter next time.

Oops. It's an option for 'git-format-patch' command... I'd like to
correct it, sorry.


Regards

Takashi Sakamoto

Patch
diff mbox series

diff --git a/alsamixer/cli.c b/alsamixer/cli.c
index 3f8f52f..7468325 100644
--- a/alsamixer/cli.c
+++ b/alsamixer/cli.c
@@ -58,7 +58,7 @@  static void parse_options(int argc, char *argv[])
 		{ .name = "view", .has_arg = 1, .val = 'V' },
 		{ .name = "no-color", .val = 'g' },
 		{ .name = "abstraction", .has_arg = 1, .val = 'a' },
-		{ }
+		{ 0 }
 	};
 	int option;
 	int card_index;
diff --git a/amidi/amidi.c b/amidi/amidi.c
index c6268e4..cde4697 100644
--- a/amidi/amidi.c
+++ b/amidi/amidi.c
@@ -469,7 +469,7 @@  int main(int argc, char *argv[])
 		{"active-sensing", 0, NULL, 'a'},
 		{"clock", 0, NULL, 'c'},
 		{"sysex-interval", 1, NULL, 'i'},
-		{ }
+		{0}
 	};
 	int c, err, ok = 0;
 	int ignore_active_sensing = 1;
diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c
index b086e70..e8491e1 100644
--- a/seq/aplaymidi/aplaymidi.c
+++ b/seq/aplaymidi/aplaymidi.c
@@ -869,7 +869,7 @@  int main(int argc, char *argv[])
 		{"list", 0, NULL, 'l'},
 		{"port", 1, NULL, 'p'},
 		{"delay", 1, NULL, 'd'},
-		{}
+		{0}
 	};
 	int c;
 	int do_list = 0;
diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
index 604cd0d..2034df7 100644
--- a/seq/aplaymidi/arecordmidi.c
+++ b/seq/aplaymidi/arecordmidi.c
@@ -740,7 +740,7 @@  int main(int argc, char *argv[])
 		{"metronome", 1, NULL, 'm'},
 		{"timesig", 1, NULL, 'i'},
 		{"num-events", 1, NULL, 'n'},
-		{ }
+		{0}
 	};
 
 	char *filename = NULL;
diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
index 578e06f..44ae3bb 100644
--- a/seq/aseqdump/aseqdump.c
+++ b/seq/aseqdump/aseqdump.c
@@ -357,7 +357,7 @@  int main(int argc, char *argv[])
 		{"version", 0, NULL, 'V'},
 		{"list", 0, NULL, 'l'},
 		{"port", 1, NULL, 'p'},
-		{ }
+		{0}
 	};
 
 	int do_list = 0;