libfprint/SOURCES/0156-fp-print-Add-FP_FINGER_IS_VALID.patch

29 lines
861 B
Diff
Raw Normal View History

2020-04-23 23:55:43 +00:00
From 24ce1c7cf833a0c1518fa7e70e210db35f201ac8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Thu, 19 Dec 2019 14:20:00 +0100
Subject: [PATCH 156/181] fp-print: Add FP_FINGER_IS_VALID
This is coming directly from fprintd, but being something generic is better
to have it insinde libfprint itself.
---
libfprint/fp-print.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libfprint/fp-print.h b/libfprint/fp-print.h
index 94034ce..3408e73 100644
--- a/libfprint/fp-print.h
+++ b/libfprint/fp-print.h
@@ -28,6 +28,9 @@ G_BEGIN_DECLS
#define FP_TYPE_PRINT (fp_print_get_type ())
G_DECLARE_FINAL_TYPE (FpPrint, fp_print, FP, PRINT, GInitiallyUnowned)
+#define FP_FINGER_IS_VALID(finger) \
+ ((finger) >= FP_FINGER_FIRST && (finger) <= FP_FINGER_LAST)
+
#include "fp-device.h"
/**
--
2.24.1