cleanup: Change datatype of secret->private to boolean

This commit is contained in:
Osier Yang 2013-04-11 11:54:37 +08:00
parent 4258a548d2
commit f4279c5320
3 changed files with 4 additions and 4 deletions

View File

@ -175,9 +175,9 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root)
prop = virXPathString("string(./@private)", ctxt);
if (prop != NULL) {
if (STREQ(prop, "yes"))
def->private = 1;
def->private = true;
else if (STREQ(prop, "no"))
def->private = 0;
def->private = false;
else {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("invalid value of 'private'"));

View File

@ -32,7 +32,7 @@ typedef struct _virSecretDef virSecretDef;
typedef virSecretDef *virSecretDefPtr;
struct _virSecretDef {
bool ephemeral;
unsigned private : 1;
bool private;
unsigned char uuid[VIR_UUID_BUFLEN];
char *description; /* May be NULL */
int usage_type;

View File

@ -481,7 +481,7 @@ virStorageGenerateQcowEncryption(virConnectPtr conn,
}
def->ephemeral = false;
def->private = 0;
def->private = false;
if (virStorageGenerateSecretUUID(conn, def->uuid) < 0)
goto cleanup;