summaryrefslogtreecommitdiffstats
path: root/server/XfrmController.cpp
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2020-04-22 09:44:19 -0700
committerMaciej Żenczykowski <maze@google.com>2020-04-22 09:54:42 -0700
commit322c9ee5fde89607c0b33aa9d765aed36ee4358a (patch)
tree6135809af4a250e0bd345c81aab5d218ceb7832c /server/XfrmController.cpp
parentdd03cb068c3200d3df27a969c5f4ddec6bed3488 (diff)
downloadplatform_system_netd-322c9ee5fde89607c0b33aa9d765aed36ee4358a.tar.gz
platform_system_netd-322c9ee5fde89607c0b33aa9d765aed36ee4358a.tar.bz2
platform_system_netd-322c9ee5fde89607c0b33aa9d765aed36ee4358a.zip
XfrmController - fix bugprone-sizeof-expression warning
Fixes: system/netd/server/XfrmController.cpp:1280:12: warning: suspicious usage of 'sizeof(A*)'; pointer to aggregate [bugprone-sizeof-expression] Test: builds Bug: 153035880 Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: If3d37a22412b1a08e0356b7a36c038a37c946ed7
Diffstat (limited to 'server/XfrmController.cpp')
-rw-r--r--server/XfrmController.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/XfrmController.cpp b/server/XfrmController.cpp
index 6906a1cf6..33a2aa214 100644
--- a/server/XfrmController.cpp
+++ b/server/XfrmController.cpp
@@ -1261,7 +1261,7 @@ int XfrmController::fillUserSpInfo(const XfrmSpInfo& record, XfrmDirection direc
return sizeof(*usersp);
}
-int XfrmController::fillUserTemplate(const XfrmSpInfo& record, xfrm_user_tmpl* tmpl) {
+void XfrmController::fillUserTemplate(const XfrmSpInfo& record, xfrm_user_tmpl* tmpl) {
tmpl->id.daddr = record.dstAddr;
tmpl->id.spi = record.spi;
tmpl->id.proto = IPPROTO_ESP;
@@ -1277,7 +1277,6 @@ int XfrmController::fillUserTemplate(const XfrmSpInfo& record, xfrm_user_tmpl* t
// algos, we should find it and apply it.
// I can't find one.
tmpl->ealgos = ALGO_MASK_CRYPT_ALL; // TODO: if there's a bitmask somewhere...
- return sizeof(xfrm_user_tmpl*);
}
int XfrmController::fillNlAttrUserTemplate(const XfrmSpInfo& record, nlattr_user_tmpl* tmpl) {