summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2012-10-29 20:05:20 +0100
committerSebastian Geerken <devnull@localhost>2012-10-29 20:05:20 +0100
commitef54550e4823fbd1536473baa8a30dcb6beec56f (patch)
treefdde673d07ae5641d9782a9c81686b51cea46773
parentd8bbe4ace24fc94ef3471479e6bf0f489226577a (diff)
parent28d6a94cd196b1603c5dac35aef57c06a68a816d (diff)
Merge?
-rw-r--r--dpi/cookies.c11
-rw-r--r--dw/hyphenator.cc4
-rw-r--r--src/css.cc8
-rw-r--r--src/findbar.cc2
4 files changed, 15 insertions, 10 deletions
diff --git a/dpi/cookies.c b/dpi/cookies.c
index 10803211..95b2a9a3 100644
--- a/dpi/cookies.c
+++ b/dpi/cookies.c
@@ -805,6 +805,9 @@ static CookieData_t *Cookies_parse(char *cookie_str, const char *server_date)
/* Get the value for the attribute and store it */
if (first_attr) {
+ time_t now;
+ struct tm *tm;
+
if (*str != '=' || *attr == '\0') {
/* disregard nameless cookie */
dFree(attr);
@@ -815,8 +818,8 @@ static CookieData_t *Cookies_parse(char *cookie_str, const char *server_date)
cookie->value = Cookies_parse_value(&str);
/* let's arbitrarily initialise with a year for now */
- time_t now = time(NULL);
- struct tm *tm = gmtime(&now);
+ now = time(NULL);
+ tm = gmtime(&now);
++tm->tm_year;
cookie->expires_at = mktime(tm);
if (cookie->expires_at == (time_t) -1)
@@ -847,10 +850,12 @@ static CookieData_t *Cookies_parse(char *cookie_str, const char *server_date)
dFree(value);
} else if (dStrAsciiCasecmp(attr, "Expires") == 0) {
if (!max_age) {
+ struct tm *tm;
+
value = Cookies_parse_value(&str);
Cookies_unquote_string(value);
_MSG("Expires attribute gives %s\n", value);
- struct tm *tm = Cookies_parse_date(value);
+ tm = Cookies_parse_date(value);
if (tm) {
tm->tm_sec += Cookies_server_timediff(server_date);
cookie->expires_at = mktime(tm);
diff --git a/dw/hyphenator.cc b/dw/hyphenator.cc
index 62a47a73..61cbef0d 100644
--- a/dw/hyphenator.cc
+++ b/dw/hyphenator.cc
@@ -490,14 +490,14 @@ Trie::Trie (TrieNode *array, int size, bool freeArray, ZoneAllocator *dataZone)
this->size = size;
this->freeArray = freeArray;
this->dataZone = dataZone;
-};
+}
Trie::~Trie ()
{
delete dataZone;
if (freeArray)
free(array);
-};
+}
void Trie::save (FILE *file)
{
diff --git a/src/css.cc b/src/css.cc
index 8cf1c8eb..48bd9c54 100644
--- a/src/css.cc
+++ b/src/css.cc
@@ -44,7 +44,7 @@ CssPropertyList::CssPropertyList (const CssPropertyList &p, bool deep) :
} else {
ownerOfStrings = false;
}
-};
+}
CssPropertyList::~CssPropertyList () {
if (ownerOfStrings)
@@ -108,7 +108,7 @@ CssSelector::CssSelector () {
cs->notMatchingBefore = -1;
cs->combinator = COMB_NONE;
cs->selector = new CssSimpleSelector ();
-};
+}
CssSelector::~CssSelector () {
for (int i = selectorList->size () - 1; i >= 0; i--)
@@ -329,12 +329,12 @@ CssRule::CssRule (CssSelector *selector, CssPropertyList *props, int pos) {
this->props->ref ();
this->pos = pos;
spec = selector->specificity ();
-};
+}
CssRule::~CssRule () {
selector->unref ();
props->unref ();
-};
+}
void CssRule::apply (CssPropertyList *props,
Doctree *docTree, const DoctreeNode *node) {
diff --git a/src/findbar.cc b/src/findbar.cc
index 47363db0..28790563 100644
--- a/src/findbar.cc
+++ b/src/findbar.cc
@@ -61,7 +61,7 @@ int MyInput::handle(int e)
if (ret)
ret = Fl_Input::handle(e);
return ret;
-};
+}
/*
* Find next occurrence of input key