aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--onion_base32.c2
-rw-r--r--sand-leek.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/onion_base32.c b/onion_base32.c
index c5b2946..78753ab 100644
--- a/onion_base32.c
+++ b/onion_base32.c
@@ -10,7 +10,7 @@ check_base32(char *subject) {
if ((offset = strspn(subject, base32_lookup)) != strlen(subject)) {
return offset;
}
- return 0;
+ return -1;
}
/* Simple and reliable base32 algorithm - "old trusty"
diff --git a/sand-leek.c b/sand-leek.c
index 22e3838..160987b 100644
--- a/sand-leek.c
+++ b/sand-leek.c
@@ -284,7 +284,7 @@ main(int argc, char **argv) {
int opt = '\0';
int thread_count = 1;
int i = 0;
- size_t offset = 0;
+ ssize_t offset = 0;
pthread_t *workers = NULL;
unsigned long volatile *khashes = NULL;
@@ -312,7 +312,7 @@ main(int argc, char **argv) {
search_len = strlen(search);
- if ((offset = check_base32(search))) {
+ if ((offset = check_base32(search)) >= 0) {
fprintf(stderr,
"Error: search contains non-base-32 character(s): %c\n"
"I cannot search for something that will never occur\n",