提交 602b4c30 编写于 作者: J John Ferlan

secret: Rename variable in virSecretObjListAdd

Rename @def to @objdef - it'll make future patches easier.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 f9ccfd59
...@@ -332,7 +332,7 @@ virSecretObjListAdd(virSecretObjListPtr secrets, ...@@ -332,7 +332,7 @@ virSecretObjListAdd(virSecretObjListPtr secrets,
virSecretDefPtr *oldDef) virSecretDefPtr *oldDef)
{ {
virSecretObjPtr obj; virSecretObjPtr obj;
virSecretDefPtr def; virSecretDefPtr objdef;
virSecretObjPtr ret = NULL; virSecretObjPtr ret = NULL;
char uuidstr[VIR_UUID_STRING_BUFLEN]; char uuidstr[VIR_UUID_STRING_BUFLEN];
char *configFile = NULL, *base64File = NULL; char *configFile = NULL, *base64File = NULL;
...@@ -347,26 +347,26 @@ virSecretObjListAdd(virSecretObjListPtr secrets, ...@@ -347,26 +347,26 @@ virSecretObjListAdd(virSecretObjListPtr secrets,
/* Is there a secret already matching this UUID */ /* Is there a secret already matching this UUID */
if ((obj = virSecretObjListFindByUUIDLocked(secrets, uuidstr))) { if ((obj = virSecretObjListFindByUUIDLocked(secrets, uuidstr))) {
virObjectLock(obj); virObjectLock(obj);
def = obj->def; objdef = obj->def;
if (STRNEQ_NULLABLE(def->usage_id, newdef->usage_id)) { if (STRNEQ_NULLABLE(objdef->usage_id, newdef->usage_id)) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("a secret with UUID %s is already defined for " _("a secret with UUID %s is already defined for "
"use with %s"), "use with %s"),
uuidstr, def->usage_id); uuidstr, objdef->usage_id);
goto cleanup; goto cleanup;
} }
if (def->isprivate && !newdef->isprivate) { if (objdef->isprivate && !newdef->isprivate) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("cannot change private flag on existing secret")); _("cannot change private flag on existing secret"));
goto cleanup; goto cleanup;
} }
if (oldDef) if (oldDef)
*oldDef = def; *oldDef = objdef;
else else
virSecretDefFree(def); virSecretDefFree(objdef);
obj->def = newdef; obj->def = newdef;
} else { } else {
/* No existing secret with same UUID, /* No existing secret with same UUID,
...@@ -375,8 +375,8 @@ virSecretObjListAdd(virSecretObjListPtr secrets, ...@@ -375,8 +375,8 @@ virSecretObjListAdd(virSecretObjListPtr secrets,
newdef->usage_type, newdef->usage_type,
newdef->usage_id))) { newdef->usage_id))) {
virObjectLock(obj); virObjectLock(obj);
def = obj->def; objdef = obj->def;
virUUIDFormat(def->uuid, uuidstr); virUUIDFormat(objdef->uuid, uuidstr);
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("a secret with UUID %s already defined for " _("a secret with UUID %s already defined for "
"use with %s"), "use with %s"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册