clean up warnings

This commit is contained in:
leitner
2024-10-21 16:02:34 +00:00
parent f85f30c379
commit 747641557e
7 changed files with 37 additions and 29 deletions

View File

@@ -4,7 +4,7 @@
size_t scan_ldapsearchfilterstring(const char* src,struct Filter** f) {
char* s=(char*)src;
if (!(*f=calloc(sizeof(struct Filter),1))) goto error;
if (!(*f=calloc(1,sizeof(struct Filter)))) return 0;
if (s[0]=='*' && (s[1]==0 || s[1]=='(')) {
size_t i=scan_ldapsearchfilterstring("(objectClass=*)",f);
if (i) return 1;
@@ -96,5 +96,6 @@ substring:
}
return s-src+1;
error:
free_ldapsearchfilter(*f);
return 0;
}