OSDN Git Service

qtaguid replace asprintf with libbase StringPrintf
authorChenbo Feng <fengc@google.com>
Thu, 29 Sep 2016 00:03:31 +0000 (17:03 -0700)
committerChenbo Feng <fengc@google.com>
Thu, 29 Sep 2016 19:39:12 +0000 (12:39 -0700)
commit31399ff50100414c07b42d50691954ae9c027fbd
treeceed008990e21f1c689d2d7e0e49334a21461915
parent2e363e48f8b0f6c11ad3184d9c010052605b480d
qtaguid replace asprintf with libbase StringPrintf

use libbase function android::base::StringPrintf for string
manipulation. Avoid free the char array at the end. Changed the program
logic of building the match template to make it more concise.

Test: manually tested on angler device. build and sync this module into
device and run adb shell ./data/nativetest64/socketTag/socketTag

Change-Id: Ic93ac4e91e87337acb2e12efadeb57833c36c95e
tests/iptables/qtaguid/Android.mk
tests/iptables/qtaguid/socketTag.cpp