changeset 34561:f744357e94bd

Make cfg_read() and cfg_write() void functions. There is no error handling other than instantly exiting MPlayer and the return values aren't used anywhere.
author ib
date Fri, 03 Feb 2012 13:57:10 +0000
parents abcf26dcec6b
children fe172cd7b8e8
files gui/cfg.c gui/cfg.h gui/win32/wincfg.c
diffstat 3 files changed, 6 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/gui/cfg.c	Fri Feb 03 13:38:42 2012 +0000
+++ b/gui/cfg.c	Fri Feb 03 13:57:10 2012 +0000
@@ -230,7 +230,7 @@
     return m_config_parse_config_file(gui_conf, filename, 0);
 }
 
-int cfg_read(void)
+void cfg_read(void)
 {
     char *cfg;
     FILE *f;
@@ -328,11 +328,9 @@
     }
 
     free(cfg);
-
-    return 0;
 }
 
-int cfg_write(void)
+void cfg_write(void)
 {
     char *cfg;
     FILE *f;
@@ -420,6 +418,4 @@
     }
 
     free(cfg);
-
-    return 0;
 }
--- a/gui/cfg.h	Fri Feb 03 13:38:42 2012 +0000
+++ b/gui/cfg.h	Fri Feb 03 13:57:10 2012 +0000
@@ -90,7 +90,7 @@
 extern char *fsHistory[5];
 
 int cfg_gui_include(m_option_t *conf, const char *filename);
-int cfg_read(void);
-int cfg_write(void);
+void cfg_read(void);
+void cfg_write(void);
 
 #endif /* MPLAYER_GUI_CFG_H */
--- a/gui/win32/wincfg.c	Fri Feb 03 13:38:42 2012 +0000
+++ b/gui/win32/wincfg.c	Fri Feb 03 13:57:10 2012 +0000
@@ -93,7 +93,7 @@
     return m_config_parse_config_file(gui_conf, filename, 0);
 }
 
-int cfg_read(void)
+void cfg_read(void)
 {
     char *cfg = get_path("gui.conf");
 
@@ -106,10 +106,9 @@
     if (m_config_parse_config_file(gui_conf, cfg, 1) < 0)
         mp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_ConfigFileError);
     free(cfg);
-    return 0;
 }
 
-int cfg_write(void)
+void cfg_write(void)
 {
     char *cfg = get_path("gui.conf");
     FILE *f;
@@ -134,5 +133,4 @@
         fclose(f);
     }
     free(cfg);
-    return 0;
 }