From e17d3e7fe7bc539ce6f7e1418ad73d8c8809c4a6 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 7 Jul 2011 17:29:42 -0600 Subject: [PATCH] conf: prefer unsigned flags * src/conf/cpu_conf.h (virCPUDefFormat, virCPUDefFormatBuf): Change flags type. * src/conf/cpu_conf.c (virCPUDefFormat, virCPUDefFormatBuf): Likewise. * src/conf/storage_conf.c (_virStoragePoolOptions): Likewise. * src/datatypes.h (_virConnect, _virStream): Likewise. --- src/conf/cpu_conf.c | 6 +++--- src/conf/cpu_conf.h | 6 +++--- src/conf/storage_conf.c | 4 ++-- src/datatypes.h | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 14e93db977..5cecda2f2b 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -1,7 +1,7 @@ /* * cpu_conf.h: CPU XML handling * - * Copyright (C) 2009, 2010 Red Hat, Inc. + * Copyright (C) 2009-2011 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -307,7 +307,7 @@ error: char * virCPUDefFormat(virCPUDefPtr def, const char *indent, - int flags) + unsigned int flags) { virBuffer buf = VIR_BUFFER_INITIALIZER; @@ -331,7 +331,7 @@ int virCPUDefFormatBuf(virBufferPtr buf, virCPUDefPtr def, const char *indent, - int flags) + unsigned int flags) { unsigned int i; diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index ecd4e10849..57b85e14f1 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -1,7 +1,7 @@ /* * cpu_conf.h: CPU XML handling * - * Copyright (C) 2009, 2010 Red Hat, Inc. + * Copyright (C) 2009-2011 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -107,13 +107,13 @@ virCPUDefIsEqual(virCPUDefPtr src, char * virCPUDefFormat(virCPUDefPtr def, const char *indent, - int flags); + unsigned int flags); int virCPUDefFormatBuf(virBufferPtr buf, virCPUDefPtr def, const char *indent, - int flags); + unsigned int flags); int virCPUDefAddFeature(virCPUDefPtr cpu, diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index f6f8be1224..cc55b80d45 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1,7 +1,7 @@ /* * storage_conf.c: config handling for storage driver * - * Copyright (C) 2006-2010 Red Hat, Inc. + * Copyright (C) 2006-2011 Red Hat, Inc. * Copyright (C) 2006-2008 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -117,7 +117,7 @@ enum { typedef struct _virStoragePoolOptions virStoragePoolOptions; typedef virStoragePoolOptions *virStoragePoolOptionsPtr; struct _virStoragePoolOptions { - int flags; + unsigned int flags; int defaultFormat; virStoragePoolFormatToString formatToString; virStoragePoolFormatFromString formatFromString; diff --git a/src/datatypes.h b/src/datatypes.h index f114360b51..91b1bfd181 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -150,7 +150,7 @@ struct _virConnect { * since. Thus no need to lock when accessing them */ unsigned int magic; /* specific value to check */ - int flags; /* a set of connection flags */ + unsigned int flags; /* a set of connection flags */ xmlURIPtr uri; /* connection URI */ /* The underlying hypervisor driver and network driver. */ @@ -297,7 +297,7 @@ struct _virStream { unsigned int magic; virConnectPtr conn; int refs; - int flags; + unsigned int flags; virStreamDriverPtr driver; void *privateData; -- GitLab