Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add gitreview file for Kooky Koi branch
[src/app-framework-binder.git]
/
src
/
globset.c
diff --git
a/src/globset.c
b/src/globset.c
index
228d852
..
5ffdfa2
100644
(file)
--- a/
src/globset.c
+++ b/
src/globset.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 201
8
"IoT.bzh"
+ * Copyright (C) 201
5-2020
"IoT.bzh"
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Author: José Bollo <jose.bollo@iot.bzh>
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@
-227,21
+227,16
@@
static struct pathndl *search(
pph = &set->globs;
else if (set->exacts)
pph = &set->exacts[hash & set->gmask];
pph = &set->globs;
else if (set->exacts)
pph = &set->exacts[hash & set->gmask];
- else
+ else {
+ *pprev = NULL;
return NULL;
return NULL;
+ }
while ((ph = *pph) && strcmp(normal, ph->handler.pattern))
pph = &ph->next;
*pprev = pph;
return ph;
}
while ((ph = *pph) && strcmp(normal, ph->handler.pattern))
pph = &ph->next;
*pprev = pph;
return ph;
}
-
-
-
-
-
-
-
/**
* Allocates a new set of handlers
*
/**
* Allocates a new set of handlers
*
@@
-323,7
+318,7
@@
int globset_add(
}
/* not found, create it */
}
/* not found, create it */
- ph = malloc(len + sizeof *ph);
+ ph = malloc(
1 +
len + sizeof *ph);
if (!ph)
return -1;
if (!ph)
return -1;