[MPlayer-dev-eng] [PATCH 4/4] stream ftp: Use C99 designated initializers

Alexander Strasser eclipse7 at gmx.net
Thu Nov 22 22:30:12 CET 2012


Simplify the initialization of the stream private struct's defaults.

It should also be easier to read for most people.

Signed-off-by: Alexander Strasser <eclipse7 at gmx.net>
---
 stream/stream_ftp.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/stream/stream_ftp.c b/stream/stream_ftp.c
index 17bdc01..1b506cb 100644
--- a/stream/stream_ftp.c
+++ b/stream/stream_ftp.c
@@ -54,17 +54,10 @@ static struct stream_priv_s {
   char *buf;
   char *cmd_buf;
 } stream_priv_dflts = {
-  "anonymous","no at spam",
-  NULL,
-  21,
-  NULL,
-  NULL,
-  NULL,
-
-  -1,
-  0,0,
-  NULL,
-  NULL,
+  .user = "anonymous",
+  .pass = "no at spam",
+  .port = 21,
+  .handle = -1,
 };
 
 #define CMD_BUFSIZE 8192
-- 
1.7.10.2.552.gaa3bb87


More information about the MPlayer-dev-eng mailing list