diff options
author | Peter Hofmann <scm@uninformativ.de> | 2014-06-14 20:07:28 +0200 |
---|---|---|
committer | Peter Hofmann <scm@uninformativ.de> | 2014-06-14 20:07:28 +0200 |
commit | ad4ebf1c4ab6d39c19cd8e84451483a606cabb2c (patch) | |
tree | 58ac3fcb96549860aa70d19b4728926c80df30ec | |
parent | a08af8e729bd9967cd2d5741f96dd0f0964a8e08 (diff) | |
download | lariza-ad4ebf1c4ab6d39c19cd8e84451483a606cabb2c.tar.gz |
Simplify zea_load_adblock()
-rw-r--r-- | zea.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -413,13 +413,12 @@ zea_load_adblock(void) GIOChannel *channel = NULL; gchar *path = NULL; gchar *buf = NULL; - gsize length, term; path = g_build_filename(g_get_user_config_dir(), "zea", "adblock.black", NULL); channel = g_io_channel_new_file(path, "r", &err); if (channel != NULL) { - while (g_io_channel_read_line(channel, &buf, &length, &term, &err) + while (g_io_channel_read_line(channel, &buf, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { g_strstrip(buf); @@ -436,9 +435,6 @@ zea_load_adblock(void) g_free(buf); } - - if (err != NULL) - g_free(err); } g_free(path); } |