strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6bdd79d
)
simplified identification_t.clone() using memcpy
author
Martin Willi
<martin@strongswan.org>
Fri, 3 Jul 2009 14:30:08 +0000
(16:30 +0200)
committer
Martin Willi
<martin@strongswan.org>
Mon, 6 Jul 2009 11:15:28 +0000
(13:15 +0200)
src/libstrongswan/utils/identification.c
patch
|
blob
|
history
diff --git
a/src/libstrongswan/utils/identification.c
b/src/libstrongswan/utils/identification.c
index
72b1c6a
..
a257747
100644
(file)
--- a/
src/libstrongswan/utils/identification.c
+++ b/
src/libstrongswan/utils/identification.c
@@
-267,8
+267,6
@@
static enumerator_t* create_part_enumerator(private_identification_t *this)
}
}
}
}
-static private_identification_t *identification_create(void);
-
/**
* updates a chunk (!????)
* TODO: We should reconsider this stuff, its not really clear
/**
* updates a chunk (!????)
* TODO: We should reconsider this stuff, its not really clear
@@
-1067,16
+1065,13
@@
int identification_printf_hook(char *dst, size_t len, printf_hook_spec_t *spec,
*/
static identification_t *clone_(private_identification_t *this)
{
*/
static identification_t *clone_(private_identification_t *this)
{
- private_identification_t *clone =
identification_create(
);
+ private_identification_t *clone =
malloc_thing(private_identification_t
);
-
clone->type = this->type
;
+
memcpy(clone, this, sizeof(private_identification_t))
;
if (this->encoded.len)
{
clone->encoded = chunk_clone(this->encoded);
}
if (this->encoded.len)
{
clone->encoded = chunk_clone(this->encoded);
}
- clone->public.equals = this->public.equals;
- clone->public.matches = this->public.matches;
-
return &clone->public;
}
return &clone->public;
}