string: fix type use in strstr()
authorJan Beulich <jbeulich@suse.com>
Wed, 13 Mar 2019 10:25:49 +0000 (11:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 13 Mar 2019 10:25:49 +0000 (11:25 +0100)
commit3bf54c9dbf51bef4c48ef2fd2139e1c9a8c596d8
tree248513ee3938608d96693e71919c557b2c864df3
parentc07186ca6665a59d8461140218cb8b53df4133fc
string: fix type use in strstr()

Using plain int for string lengths, while okay for all practical
purposes, is undesirable in a generic library function.

Take the opportunity and also move the function from being in the middle
of mem*() ones to the set of str*() ones, convert its loop from while()
to for(), and correct style.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/string.c