netsurf: branch master updated. release/3.0-142-g45d309c

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Tue May 28 20:03:30 BST 2013


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/45d309c0e3020afd785e4342cde7893b4afccd2a
...commit http://git.netsurf-browser.org/netsurf.git/commit/45d309c0e3020afd785e4342cde7893b4afccd2a
...tree http://git.netsurf-browser.org/netsurf.git/tree/45d309c0e3020afd785e4342cde7893b4afccd2a

The branch, master has been updated
       via  45d309c0e3020afd785e4342cde7893b4afccd2a (commit)
      from  9d00f63ff4fabdc7f446b51edfcb79719fd648a9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=45d309c0e3020afd785e4342cde7893b4afccd2a
commit 45d309c0e3020afd785e4342cde7893b4afccd2a
Author: Vincent Sanders <vince at kyllikki.org>
Commit: Vincent Sanders <vince at kyllikki.org>

    copy the options data with memcpy instead

diff --git a/utils/nsoption.c b/utils/nsoption.c
index 34c653b..e2fe225 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -395,19 +395,15 @@ nsoption_init(nsoption_set_default_t *set_defaults,
 	src = &defaults[0];
 	dst = opts;
 
+	memcpy(dst, src, sizeof(defaults));
+
 	while (src->key != NULL) {
-		dst->key = src->key;
-		dst->key_len = src->key_len;
-		dst->type = src->type;
 		if ((src->type == OPTION_STRING) && (src->value.s != NULL)) {
 			dst->value.s = strdup(src->value.s);
-		} else {
-			dst->value = src->value;
 		}
 		src++;
 		dst++;
 	}
-	dst->key = src->key;
 
 	/* return values if wanted */
 	if (popts != NULL) {


-----------------------------------------------------------------------

Summary of changes:
 utils/nsoption.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/utils/nsoption.c b/utils/nsoption.c
index 34c653b..e2fe225 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -395,19 +395,15 @@ nsoption_init(nsoption_set_default_t *set_defaults,
 	src = &defaults[0];
 	dst = opts;
 
+	memcpy(dst, src, sizeof(defaults));
+
 	while (src->key != NULL) {
-		dst->key = src->key;
-		dst->key_len = src->key_len;
-		dst->type = src->type;
 		if ((src->type == OPTION_STRING) && (src->value.s != NULL)) {
 			dst->value.s = strdup(src->value.s);
-		} else {
-			dst->value = src->value;
 		}
 		src++;
 		dst++;
 	}
-	dst->key = src->key;
 
 	/* return values if wanted */
 	if (popts != NULL) {


-- 
NetSurf Browser



More information about the netsurf-commits mailing list