Mercurial > audlegacy
changeset 1138:fae48961b173 trunk
[svn] - don't pass NULL to atoi().
author | nenolod |
---|---|
date | Sun, 04 Jun 2006 13:20:40 -0700 |
parents | 7b857b8cdcbd |
children | 9563c642d436 |
files | Plugins/Input/mpg123/mpg123.c Plugins/Input/vorbis/vorbis.c |
diffstat | 2 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);