From 280344488f09ff29deb052dfa94ed74668c00b18 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 23 Oct 2026 22:10:58 +0200 Subject: Remove last byte_diff and provide more prototypes --- ot_sync.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ot_sync.c') diff --git a/ot_sync.c b/ot_sync.c index 65a8170..2241bf3 100644 --- a/ot_sync.c +++ b/ot_sync.c @@ -12,7 +12,6 @@ #include /* Libowfat */ -#include "byte.h" #include "io.h" #include "scan.h" @@ -36,15 +35,15 @@ int add_changeset_to_tracker(uint8_t *data, size_t len) { uint8_t *end = data + len; unsigned long peer_count; - /* We do know, that the string is \n terminated, so it cant + /* We do know, that the string is \n terminated, so it can't overflow */ - if (byte_diff(data, 8, "d4:syncd")) + if (!memcmp(data, "d4:syncd", 8)) return -1; data += 8; while (1) { - if (byte_diff(data, 3, "20:")) { - if (byte_diff(data, 2, "ee")) + if (!memcmp(data, "20:", 3)) { + if (!memcmp(data, "ee", 2)) return -1; return 0; } -- cgit v1.3