Propagate null gstring through string_catn()
[exim.git] / src / src / functions.h
index efabef044b96ef5b7e305ec8a757d72e3700128e..39dfc46fe696fc7c8d87bf7d7403c49921b89c13 100644 (file)
@@ -236,7 +236,7 @@ extern BOOL    dscp_lookup(const uschar *, int, int *, int *, int *);
 extern void    enq_end(uschar *);
 extern BOOL    enq_start(uschar *, unsigned);
 #ifndef DISABLE_EVENT
-extern uschar *event_raise(uschar *, const uschar *, uschar *);
+extern uschar *event_raise(uschar *, const uschar *, uschar *, int *);
 extern void    msg_event_raise(const uschar *, const address_item *);
 #endif
 
@@ -810,11 +810,11 @@ Returns:  copy of string in new store, with letters lowercased
 */
 
 static inline uschar *
-string_copylc(const uschar *s)
+string_copylc(const uschar * s)
 {
-uschar *ss = store_get(Ustrlen(s) + 1, is_tainted(s));
-uschar *p = ss;
-while (*s != 0) *p++ = tolower(*s++);
+uschar * ss = store_get(Ustrlen(s) + 1, is_tainted(s));
+uschar * p = ss;
+while (*s) *p++ = tolower(*s++);
 *p = 0;
 return ss;
 }
@@ -836,7 +836,7 @@ Returns:    copy of string in new store, with letters lowercased
 */
 
 static inline uschar *
-string_copynlc(uschar *s, int n)
+string_copynlc(uschar * s, int n)
 {
 uschar *ss = store_get(n + 1, is_tainted(s));
 uschar *p = ss;
@@ -900,7 +900,7 @@ static inline gstring *
 string_get_tainted_trc(unsigned size, BOOL tainted, const char * func, unsigned line)
 {
 gstring * g = store_get_3(sizeof(gstring) + size, tainted, func, line);
-g->size = size;
+g->size = size;                /*XXX would be good if we could see the actual alloc size */
 g->ptr = 0;
 g->s = US(g + 1);
 return g;
@@ -989,7 +989,6 @@ could be used and would handle that implicitly. */
 static inline dns_answer *
 store_get_dns_answer_trc(const uschar * func, unsigned line)
 {
-/* return store_get_3(sizeof(dns_answer), TRUE, CCS func, line);   use tainted mem */
 return store_malloc_3(sizeof(dns_answer), CCS func, line);
 }