@@ -975,26 +975,27 @@ void config_init (char *fname, struct audio_s *p_audio_config,
975
975
if (realpath (fname , absfilepath ) != NULL ) {
976
976
#endif
977
977
fp = fopen (absfilepath , "r" );
978
- if (fp == NULL ) { // Failed. Next, try home dir
979
- strlcpy (absfilepath , "" , sizeof (absfilepath ));
978
+ }
979
+
980
+ if (fp == NULL ) { // Failed. Next, try home dir
981
+ strlcpy (absfilepath , "" , sizeof (absfilepath ));
980
982
#ifdef __WIN32__
981
- char * h = getenv ("USERPROFILE" );
982
- if (h != NULL && fname [0 ] != '\\' && fname [1 ] != ':' ) {
983
- strlcat (absfilepath , h , sizeof (absfilepath ));
984
- strlcat (absfilepath , "\\" , sizeof (absfilepath ));
985
- }
983
+ char * h = getenv ("USERPROFILE" );
984
+ if (h != NULL && fname [0 ] != '\\' && fname [1 ] != ':' ) {
985
+ strlcat (absfilepath , h , sizeof (absfilepath ));
986
+ strlcat (absfilepath , "\\" , sizeof (absfilepath ));
987
+ }
986
988
#else
987
- // Don't prepend home dir if absolute path given.
988
- char * h = getenv ("HOME" );
989
- if (h != NULL && fname [0 ] != '/' ) {
990
- strlcat (absfilepath , h , sizeof (absfilepath ));
991
- strlcat (absfilepath , "/" , sizeof (absfilepath ));
992
- }
989
+ // Don't prepend home dir if absolute path given.
990
+ char * h = getenv ("HOME" );
991
+ if (h != NULL && fname [0 ] != '/' ) {
992
+ strlcat (absfilepath , h , sizeof (absfilepath ));
993
+ strlcat (absfilepath , "/" , sizeof (absfilepath ));
994
+ }
993
995
#endif
994
996
strlcat (absfilepath , fname , sizeof (absfilepath ));
995
997
996
- fp = fopen (absfilepath , "r" );
997
- }
998
+ fp = fopen (absfilepath , "r" );
998
999
}
999
1000
1000
1001
if (fp == NULL ) {
0 commit comments