summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-03-11 00:04:48 -0700
committerMichael Pavone <pavone@retrodev.com>2019-03-11 00:04:48 -0700
commite2281e5a19682d44435b1015c4ce4a64b7e3b586 (patch)
treef2292fce0eb4690470f73c583047719c691be96f /util.c
parent3d12dcb00997921347170b7f87b54f787a80c678 (diff)
Minor cleanup
Diffstat (limited to 'util.c')
-rw-r--r--util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util.c b/util.c
index 50f79ee..88a6d4f 100644
--- a/util.c
+++ b/util.c
@@ -189,6 +189,11 @@ char * split_keyval(char * text)
return text+1;
}
+uint8_t startswith(const char *haystack, const char *prefix)
+{
+ return !strncmp(haystack, prefix, strlen(prefix));
+}
+
void bin_to_hex(uint8_t *output, uint8_t *input, uint64_t size)
{
while (size)