[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] virCgroupAddTaskStrController: s/-1/-ENOMEM/

Within whole vircgroup.c we 'return -errno', e.g. 'return -ENOMEM'.
However, in this specific function virCgroupAddTaskStrController
we weren't returning -ENOMEM but -1 despite fact that later in
the function we are returning one of errno values indeed.

    Pushing under trivial rule. This change has been sort of ACKed
    previously though:
    However, Eric suggested to be pushed as a separate patch.

 src/util/vircgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index cc144a5..13b7332 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1028,7 +1028,7 @@ static int virCgroupAddTaskStrController(virCgroupPtr group,
     char *endp;
     if (!(str = strdup(pidstr)))
-        return -1;
+        return -ENOMEM;
     cur = str;
     while (*cur != '\0') {

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]