mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
CLEANUP: log: lf_text_len() returns a pointer not an integer
Inc83684519
("MEDIUM: log: add the ability to include samples in logs") we checked the return value of lf_text_len() as an integer instead of comparing the pointer with NULL explicitly. Since this may be confusing, let's test the return value against NULL. [ada: for backports, the patch needs to be applied manually because ofc6a713842
("MINOR: log: simplify last_isspace in sess_build_logline()")]
This commit is contained in:
parent
28548f812f
commit
9420cfc0db
@ -3038,7 +3038,7 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t
|
|||||||
key ? key->data.u.str.data : 0,
|
key ? key->data.u.str.data : 0,
|
||||||
dst + maxsize - tmplog,
|
dst + maxsize - tmplog,
|
||||||
tmp);
|
tmp);
|
||||||
if (ret == 0)
|
if (ret == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
tmplog = ret;
|
tmplog = ret;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user