summaryrefslogtreecommitdiff
path: root/src/analysis/db/misc
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-29 21:27:03 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-29 21:27:03 (GMT)
commit3a83a06db8ee27eafcd0219d1d26bf2af23737f5 (patch)
tree163ea7fbe1435b9f380e7ae96dfc36d8f16d1d0a /src/analysis/db/misc
parent55bc8570f25a479b222733c4093f9ae996c9f68e (diff)
Cleaned the DB code a little bit.
Diffstat (limited to 'src/analysis/db/misc')
-rw-r--r--src/analysis/db/misc/timestamp.c8
-rw-r--r--src/analysis/db/misc/timestamp.h5
2 files changed, 3 insertions, 10 deletions
diff --git a/src/analysis/db/misc/timestamp.c b/src/analysis/db/misc/timestamp.c
index 1d2fcd9..6453953 100644
--- a/src/analysis/db/misc/timestamp.c
+++ b/src/analysis/db/misc/timestamp.c
@@ -68,13 +68,11 @@ void init_timestamp(timestamp_t *timestamp)
bool timestamp_is_younger(timestamp_t stamp, timestamp_t limit)
{
- if (limit == TIMESTAMP_ALL_ACTIVE)
- return true;
+ bool result; /* Bilan à retourner */
- if (limit == TIMESTAMP_ALL_INACTIVE)
- return false;
+ result = (stamp <= limit);
- return (stamp <= limit);
+ return result;
}
diff --git a/src/analysis/db/misc/timestamp.h b/src/analysis/db/misc/timestamp.h
index 4ff714e..002f4d4 100644
--- a/src/analysis/db/misc/timestamp.h
+++ b/src/analysis/db/misc/timestamp.h
@@ -38,11 +38,6 @@
typedef uint64_t timestamp_t;
-/* Valeurs particulières */
-#define TIMESTAMP_ALL_ACTIVE 0 // REMME
-#define TIMESTAMP_ALL_INACTIVE 1 // REMME
-
-
/* Obtient un horodatage initialisé au moment même. */
void init_timestamp(timestamp_t *);