[PATCH] Invert the bit of type-selection logic in resource_del() to match the other

# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1216844705 25200 # Node ID 9c40868b04724e898011ecd6717162bc02c61781 # Parent 039b7c1f078d007f02224652235edea0a7113926 Invert the bit of type-selection logic in resource_del() to match the other functions. AFAICT, this still did succeeded and failed in the right places, but deeper down and with less appropriate error messages. Signed-off-by: Dan Smith <danms@us.ibm.com> diff -r 039b7c1f078d -r 9c40868b0472 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Jul 23 13:23:03 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 23 13:25:05 2008 -0700 @@ -1258,14 +1258,14 @@ _list = find_list(dominfo, type, &count); if ((type == CIM_RES_TYPE_MEM) || (type == CIM_RES_TYPE_PROC) || - (_list != NULL)) - list = *_list; - else { + (*_list == NULL)) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Cannot delete resources of type %" PRIu16, type); goto out; } + + list = *_list; cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED,

Dan Smith wrote:
# HG changeset patch # User Dan Smith <danms@us.ibm.com> # Date 1216844705 25200 # Node ID 9c40868b04724e898011ecd6717162bc02c61781 # Parent 039b7c1f078d007f02224652235edea0a7113926 Invert the bit of type-selection logic in resource_del() to match the other functions.
AFAICT, this still did succeeded and failed in the right places, but deeper down and with less appropriate error messages.
Signed-off-by: Dan Smith <danms@us.ibm.com>
diff -r 039b7c1f078d -r 9c40868b0472 src/Virt_VirtualSystemManagementService.c
+1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Dan Smith
-
Kaitlin Rupert