# HG changeset patch # User nenolod # Date 1149452440 25200 # Node ID fae48961b173e3f9b95f7e0d523cc8015db98006 # Parent 7b857b8cdcbd2b8b4a8b794d600079c665ca9d17 [svn] - don't pass NULL to atoi(). diff -r 7b857b8cdcbd -r fae48961b173 Plugins/Input/mpg123/mpg123.c --- a/Plugins/Input/mpg123/mpg123.c Sun Jun 04 02:26:39 2006 -0700 +++ b/Plugins/Input/mpg123/mpg123.c Sun Jun 04 13:20:40 2006 -0700 @@ -149,7 +149,7 @@ init(void) { ConfigDb *db; - gchar *tmp; + gchar *tmp = NULL; ins = mpgdec_new(); @@ -208,7 +208,10 @@ bmp_cfg_db_get_bool(db, NULL, "use_proxy", &mpgdec_cfg.use_proxy); bmp_cfg_db_get_string(db, NULL, "proxy_host", &mpgdec_cfg.proxy_host); bmp_cfg_db_get_string(db, NULL, "proxy_port", &tmp); - mpgdec_cfg.proxy_port = atoi(tmp); + + if (tmp != NULL) + mpgdec_cfg.proxy_port = atoi(tmp); + bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &mpgdec_cfg.proxy_use_auth); bmp_cfg_db_get_string(db, NULL, "proxy_user", &mpgdec_cfg.proxy_user); bmp_cfg_db_get_string(db, NULL, "proxy_pass", &mpgdec_cfg.proxy_pass); diff -r 7b857b8cdcbd -r fae48961b173 Plugins/Input/vorbis/vorbis.c --- a/Plugins/Input/vorbis/vorbis.c Sun Jun 04 02:26:39 2006 -0700 +++ b/Plugins/Input/vorbis/vorbis.c Sun Jun 04 13:20:40 2006 -0700 @@ -897,7 +897,10 @@ bmp_cfg_db_get_bool(db, NULL, "use_proxy", &vorbis_cfg.use_proxy); bmp_cfg_db_get_string(db, NULL, "proxy_host", &vorbis_cfg.proxy_host); bmp_cfg_db_get_string(db, NULL, "proxy_port", &tmp); - vorbis_cfg.proxy_port = atoi(tmp); + + if (tmp != NULL) + vorbis_cfg.proxy_port = atoi(tmp); + bmp_cfg_db_get_bool(db, NULL, "proxy_use_auth", &vorbis_cfg.proxy_use_auth); bmp_cfg_db_get_string(db, NULL, "proxy_user", &vorbis_cfg.proxy_user); bmp_cfg_db_get_string(db, NULL, "proxy_pass", &vorbis_cfg.proxy_pass);