summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSasha Levitskiy <sanek@google.com>2015-06-10 12:18:57 -0700
committerSasha Levitskiy <sanek@google.com>2015-06-10 12:18:57 -0700
commiteccd6803dafd9c7450791c516a6afd1fbd3ef22c (patch)
treecb9cee53131b13a7a0edae2ea0275bf8f2316f5c
parent32b4b27b0fbedab32697996af023ba39793a5bd4 (diff)
downloadandroid_device_generic_goldfish-eccd6803dafd9c7450791c516a6afd1fbd3ef22c.tar.gz
android_device_generic_goldfish-eccd6803dafd9c7450791c516a6afd1fbd3ef22c.tar.bz2
android_device_generic_goldfish-eccd6803dafd9c7450791c516a6afd1fbd3ef22c.zip
Fingerprint: Avoid passing structures by value
Bug 21282699 Change-Id: I33769066df031c1606f5f8721b7bac6f684c2400 Signed-off-by: Sasha Levitskiy <sanek@google.com>
-rw-r--r--fingerprint/fingerprint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fingerprint/fingerprint.c b/fingerprint/fingerprint.c
index 436081d..c3dc787 100644
--- a/fingerprint/fingerprint.c
+++ b/fingerprint/fingerprint.c
@@ -92,7 +92,7 @@ static void save_fingerid(FILE* fp, int fingerid, uint64_t secureid, uint64_t au
static void listener_send_notice(emu_fingerprint_hal_device_t* dev)
{
- fingerprint_msg_t message;
+ fingerprint_msg_t message = {0};
bool is_authentication = false;
bool is_valid_finger = false;
pthread_mutex_lock(&dev->listener.mutex);
@@ -130,13 +130,13 @@ static void listener_send_notice(emu_fingerprint_hal_device_t* dev)
pthread_mutex_lock(&dev->lock);
if (is_authentication) {
- fingerprint_msg_t acquired_message;
+ fingerprint_msg_t acquired_message = {0};
acquired_message.type = FINGERPRINT_ACQUIRED;
message.data.acquired.acquired_info = FINGERPRINT_ACQUIRED_GOOD;
- dev->device.notify(acquired_message);
+ dev->device.notify(&acquired_message);
}
if (is_valid_finger || is_authentication) {
- dev->device.notify(message);
+ dev->device.notify(&message);
}
pthread_mutex_unlock(&dev->lock);
}
@@ -314,7 +314,7 @@ static int fingerprint_enumerate(struct fingerprint_device *device,
}
static int fingerprint_remove(struct fingerprint_device __unused *dev,
- fingerprint_finger_id_t __unused fingerprint_id) {
+ uint32_t __unused gid, uint32_t __unused fid) {
// TODO: implement enroll and remove, and set dev->authenticator_id = 0 when no FPs enrolled
return FINGERPRINT_ERROR;
}