virsh: Add helper to avoid the strcase check for virsh-*.c

* tools/virsh.c: New macro vshStrcasecmp
* tools/virsh-domain-monitor.c: Use vshStrcasecmp instead of
                                strcasecmp
* tools/virsh-snapshot.c: Likewise
* cfg.mk: Only avoid doing strcase checking for virsh.c
This commit is contained in:
Osier Yang
2012-08-14 15:21:44 +08:00
parent 1f7a291c96
commit be023c0896
4 changed files with 8 additions and 7 deletions

View File

@@ -1273,7 +1273,7 @@ vshDomainSorter(const void *a, const void *b)
idb = virDomainGetID(*db);
if (ida == inactive && idb == inactive)
return strcasecmp(virDomainGetName(*da), virDomainGetName(*db));
return vshStrcasecmp(virDomainGetName(*da), virDomainGetName(*db));
if (ida != inactive && idb != inactive) {
if (ida > idb)