chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strv: return NULL from strv_free()
[elogind.git]
/
src
/
shared
/
strv.c
diff --git
a/src/shared/strv.c
b/src/shared/strv.c
index 2268bf61db33ff42427b8731b60e82d2f3282ee0..8c6ba6a6336c1e252218c1c8b6109b81e77e37a1 100644
(file)
--- a/
src/shared/strv.c
+++ b/
src/shared/strv.c
@@
-19,7
+19,6
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
@@
-81,9
+80,10
@@
void strv_clear(char **l) {
*l = NULL;
}
*l = NULL;
}
-
void
strv_free(char **l) {
+
char **
strv_free(char **l) {
strv_clear(l);
free(l);
strv_clear(l);
free(l);
+ return NULL;
}
char **strv_copy(char * const *l) {
}
char **strv_copy(char * const *l) {
@@
-693,7
+693,7
@@
char **strv_reverse(char **l) {
return l;
}
return l;
}
-bool strv_fnmatch(c
onst char *s, char* const* pattern
s, int flags) {
+bool strv_fnmatch(c
har* const* patterns, const char *
s, int flags) {
char* const* p;
STRV_FOREACH(p, patterns)
char* const* p;
STRV_FOREACH(p, patterns)