aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-06-19 12:39:12 +0200
committerTobias Brunner <tobias@strongswan.org>2013-07-08 18:49:30 +0200
commitd27f225d9a1064b5883002a293d6adddfbc99a07 (patch)
tree1350ed1a7ccf44fdcfefac02e204406eaddb0b69 /src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
parentf460facdca9995e32d1c69f84945a306c6063a40 (diff)
downloadstrongswan-d27f225d9a1064b5883002a293d6adddfbc99a07.tar.bz2
strongswan-d27f225d9a1064b5883002a293d6adddfbc99a07.tar.xz
Use strpfx() helper where appropriate
Diffstat (limited to 'src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c')
-rw-r--r--src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
index 5ca5879ff..38c92ce71 100644
--- a/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
+++ b/src/libhydra/plugins/kernel_klips/kernel_klips_ipsec.c
@@ -78,7 +78,7 @@
/** this is the default number of ipsec devices */
#define DEFAULT_IPSEC_DEV_COUNT 4
/** TRUE if the given name matches an ipsec device */
-#define IS_IPSEC_DEV(name) (strneq((name), IPSEC_DEV_PREFIX, sizeof(IPSEC_DEV_PREFIX) - 1))
+#define IS_IPSEC_DEV(name) (strpfx((name), IPSEC_DEV_PREFIX))
/** the following stuff is from ipsec_tunnel.h */
struct ipsectunnelconf
@@ -2332,7 +2332,7 @@ METHOD(kernel_ipsec_t, query_policy, status_t,
while (fgets(line, sizeof(line), file))
{
- if (strneq(line, said, strlen(said)))
+ if (strpfx(line, said))
{
/* fine we found the correct line, now find the idle time */
u_int32_t idle_time;