[alsa-devel] [PATCH alsa-utils 4/4] Avoid empty initializer list

Michael Forney mforney at mforney.org
Wed Feb 5 09:12:21 CET 2020


To zero-initialize an object, use `{0}` instead.

Signed-off-by: Michael Forney <mforney at 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(-)

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



More information about the Alsa-devel mailing list