aboutsummaryrefslogtreecommitdiff
path: root/src/form.cc
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-14 23:03:19 +0200
committerjcid <devnull@localhost>2008-10-14 23:03:19 +0200
commit1370ef0c522982104c269cb44dd4d0e69400093c (patch)
treefb297ca067b80c334265e1020f703e86e8728425 /src/form.cc
parenta5acea975223b434f477e000e42be73284cf1603 (diff)
.
Diffstat (limited to 'src/form.cc')
-rw-r--r--src/form.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/form.cc b/src/form.cc
index 02150a11..f764c563 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -410,7 +410,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
inp_type = DILLO_HTML_INPUT_PASSWORD;
EntryResource *entryResource = factory->createEntryResource (10, true);
embed = new Embed (entryResource);
- init_str = (value) ? value : NULL;
+ init_str = value;
} else if (!dStrcasecmp(type, "checkbox")) {
inp_type = DILLO_HTML_INPUT_CHECKBOX;
CheckButtonResource *check_b_r=factory->createCheckButtonResource(false);
@@ -426,11 +426,10 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
rb_r = factory->createRadioButtonResource(rb_r, false);
embed = new Embed (rb_r);
init_val = (a_Html_get_attr(html, tag, tagsize, "checked") != NULL);
- init_str = (value) ? value : NULL;
+ init_str = value;
} else if (!dStrcasecmp(type, "hidden")) {
inp_type = DILLO_HTML_INPUT_HIDDEN;
- if (value)
- init_str = dStrdup(a_Html_get_attr(html, tag, tagsize, "value"));
+ init_str = value;
} else if (!dStrcasecmp(type, "submit")) {
inp_type = DILLO_HTML_INPUT_SUBMIT;
init_str = (value) ? value : dStrdup("submit");
@@ -497,7 +496,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize)
inp_type = DILLO_HTML_INPUT_TEXT;
EntryResource *entryResource = factory->createEntryResource (10, false);
embed = new Embed (entryResource);
- init_str = (value) ? value : NULL;
+ init_str = value;
} else {
/* Unknown input type */
BUG_MSG("Unknown input type: \"%s\"\n", type);