From 3c41d2a35e6dd03d55414607461a8ec37783faf4 Mon Sep 17 00:00:00 2001 From: Hannes Schueller Date: Sun, 1 Apr 2012 10:26:36 +0200 Subject: [PATCH] removing dead code --- main.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/main.c b/main.c index 535ef5a..d0e60b5 100644 --- a/main.c +++ b/main.c @@ -1914,19 +1914,14 @@ process_set_line(char *line) { } } if (browsersettings[i].var != NULL) { - /* write value into internal variable */ - /*if (browsersettings[i].intval) { - browsersettings[i].var = atoi(my_pair.value); - } else {*/ - strncpy(browsersettings[i].var, my_pair.value, MAX_SETTING_SIZE); - if (strlen(my_pair.value) > MAX_SETTING_SIZE - 1) { - /* in this case, \0 will not have been copied */ - browsersettings[i].var[MAX_SETTING_SIZE - 1] = '\0'; - /* in case this string is also used for a webkit setting, make sure it's consistent */ - my_pair.value[MAX_SETTING_SIZE - 1] = '\0'; - give_feedback("String too long; automatically truncated!"); - } - /*}*/ + strncpy(browsersettings[i].var, my_pair.value, MAX_SETTING_SIZE); + if (strlen(my_pair.value) > MAX_SETTING_SIZE - 1) { + /* in this case, \0 will not have been copied */ + browsersettings[i].var[MAX_SETTING_SIZE - 1] = '\0'; + /* in case this string is also used for a webkit setting, make sure it's consistent */ + my_pair.value[MAX_SETTING_SIZE - 1] = '\0'; + give_feedback("String too long; automatically truncated!"); + } } if (strlen(browsersettings[i].webkit) > 0) { /* activate appropriate webkit setting */ -- 2.11.4.GIT