mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
use g_ascii_tolower instead of c_tolower from gnulib
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
51c2bc4ba9
commit
cc0e7541ad
@ -49,7 +49,6 @@
|
|||||||
#include "virauth.h"
|
#include "virauth.h"
|
||||||
#include "virauthconfig.h"
|
#include "virauthconfig.h"
|
||||||
#include "virstring.h"
|
#include "virstring.h"
|
||||||
#include "c-ctype.h"
|
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_REMOTE
|
#define VIR_FROM_THIS VIR_FROM_REMOTE
|
||||||
|
|
||||||
@ -225,7 +224,7 @@ static int remoteSplitURIScheme(virURIPtr uri,
|
|||||||
|
|
||||||
p = *transport;
|
p = *transport;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
*p = c_tolower(*p);
|
*p = g_ascii_tolower(*p);
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|
||||||
#include "c-ctype.h"
|
|
||||||
#include "virmacaddr.h"
|
#include "virmacaddr.h"
|
||||||
#include "virrandom.h"
|
#include "virrandom.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
@ -42,8 +41,8 @@ virMacAddrCompare(const char *p, const char *q)
|
|||||||
++p;
|
++p;
|
||||||
while (*q == '0' && g_ascii_isxdigit(q[1]))
|
while (*q == '0' && g_ascii_isxdigit(q[1]))
|
||||||
++q;
|
++q;
|
||||||
c = c_tolower(*p);
|
c = g_ascii_tolower(*p);
|
||||||
d = c_tolower(*q);
|
d = g_ascii_tolower(*q);
|
||||||
|
|
||||||
if (c == 0 || d == 0)
|
if (c == 0 || d == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -63,7 +63,6 @@
|
|||||||
# include <sys/un.h>
|
# include <sys/un.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "c-ctype.h"
|
|
||||||
#include "mgetgroups.h"
|
#include "mgetgroups.h"
|
||||||
#include "virerror.h"
|
#include "virerror.h"
|
||||||
#include "virlog.h"
|
#include "virlog.h"
|
||||||
@ -201,7 +200,7 @@ virScaleInteger(unsigned long long *value, const char *suffix,
|
|||||||
|
|
||||||
if (!suffix[1] || STRCASEEQ(suffix + 1, "iB")) {
|
if (!suffix[1] || STRCASEEQ(suffix + 1, "iB")) {
|
||||||
base = 1024;
|
base = 1024;
|
||||||
} else if (c_tolower(suffix[1]) == 'b' && !suffix[2]) {
|
} else if (g_ascii_tolower(suffix[1]) == 'b' && !suffix[2]) {
|
||||||
base = 1000;
|
base = 1000;
|
||||||
} else {
|
} else {
|
||||||
virReportError(VIR_ERR_INVALID_ARG,
|
virReportError(VIR_ERR_INVALID_ARG,
|
||||||
@ -209,7 +208,7 @@ virScaleInteger(unsigned long long *value, const char *suffix,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
scale = 1;
|
scale = 1;
|
||||||
switch (c_tolower(*suffix)) {
|
switch (g_ascii_tolower(*suffix)) {
|
||||||
case 'e':
|
case 'e':
|
||||||
scale *= base;
|
scale *= base;
|
||||||
G_GNUC_FALLTHROUGH;
|
G_GNUC_FALLTHROUGH;
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <c-ctype.h>
|
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virerror.h"
|
#include "virerror.h"
|
||||||
#include "virfile.h"
|
#include "virfile.h"
|
||||||
@ -1095,7 +1093,7 @@ virVMXHandleLegacySCSIDiskDriverName(virDomainDefPtr def,
|
|||||||
tmp = copy;
|
tmp = copy;
|
||||||
|
|
||||||
for (; *tmp != '\0'; ++tmp)
|
for (; *tmp != '\0'; ++tmp)
|
||||||
*tmp = c_tolower(*tmp);
|
*tmp = g_ascii_tolower(*tmp);
|
||||||
|
|
||||||
model = virDomainControllerModelSCSITypeFromString(copy);
|
model = virDomainControllerModelSCSITypeFromString(copy);
|
||||||
VIR_FREE(copy);
|
VIR_FREE(copy);
|
||||||
@ -1977,7 +1975,7 @@ virVMXParseSCSIController(virConfPtr conf, int controller, bool *present,
|
|||||||
tmp = virtualDev_string;
|
tmp = virtualDev_string;
|
||||||
|
|
||||||
for (; *tmp != '\0'; ++tmp)
|
for (; *tmp != '\0'; ++tmp)
|
||||||
*tmp = c_tolower(*tmp);
|
*tmp = g_ascii_tolower(*tmp);
|
||||||
|
|
||||||
*virtualDev = virVMXControllerModelSCSITypeFromString(virtualDev_string);
|
*virtualDev = virVMXControllerModelSCSITypeFromString(virtualDev_string);
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virbitmap.h"
|
#include "virbitmap.h"
|
||||||
#include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
#include "c-ctype.h"
|
|
||||||
#include "conf/domain_conf.h"
|
#include "conf/domain_conf.h"
|
||||||
#include "viralloc.h"
|
#include "viralloc.h"
|
||||||
#include "vircommand.h"
|
#include "vircommand.h"
|
||||||
@ -8844,7 +8843,7 @@ static int getSignalNumber(const char *signame)
|
|||||||
char *p = str;
|
char *p = str;
|
||||||
|
|
||||||
for (i = 0; signame[i]; i++)
|
for (i = 0; signame[i]; i++)
|
||||||
p[i] = c_tolower(signame[i]);
|
p[i] = g_ascii_tolower(signame[i]);
|
||||||
|
|
||||||
if (virStrToLong_i(p, NULL, 10, &signum) >= 0)
|
if (virStrToLong_i(p, NULL, 10, &signum) >= 0)
|
||||||
return signum;
|
return signum;
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "c-ctype.h"
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -2343,7 +2342,7 @@ vshAskReedit(vshControl *ctl, const char *msg, bool relax_avail)
|
|||||||
while (true) {
|
while (true) {
|
||||||
vshPrint(ctl, "\r%s %s %s: ", msg, _("Try again?"),
|
vshPrint(ctl, "\r%s %s %s: ", msg, _("Try again?"),
|
||||||
relax_avail ? "[y,n,i,f,?]" : "[y,n,f,?]");
|
relax_avail ? "[y,n,i,f,?]" : "[y,n,f,?]");
|
||||||
c = c_tolower(getchar());
|
c = g_ascii_tolower(getchar());
|
||||||
|
|
||||||
if (c == '?') {
|
if (c == '?') {
|
||||||
vshPrintRaw(ctl,
|
vshPrintRaw(ctl,
|
||||||
|
Loading…
Reference in New Issue
Block a user