mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
internal: Introduce STRCASESKIP()
There is so far one case where STRCASEPREFIX(a, b) && a + strlen(b) combo is used (in virVMXConfigScanResultsCollector()), but there will be more. Do what we do usually: introduce a macro. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
This commit is contained in:
@@ -750,6 +750,15 @@ use one of the following semantically named macros
|
||||
* use: */
|
||||
STRSKIP(a, b)
|
||||
|
||||
- For skipping prefix case insensitively:
|
||||
|
||||
::
|
||||
|
||||
/* Instead of:
|
||||
* STRCASEPREFIX(a, b) ? a + strlen(b) : NULL
|
||||
* use: */
|
||||
STRCASESKIP(a, b)
|
||||
|
||||
- To avoid having to check if a or b are NULL:
|
||||
|
||||
::
|
||||
|
||||
Reference in New Issue
Block a user