]> xenbits.xensource.com Git - libvirt.git/commitdiff
virCgroupAddTaskStrController: s/-1/-ENOMEM/
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 24 May 2013 07:49:54 +0000 (09:49 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 24 May 2013 08:03:22 +0000 (10:03 +0200)
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.

src/util/vircgroup.c

index cc144a53069f07a7defc8508084b73a43fbfaac5..13b73323d755b7332044a20af6dc9e872651136e 100644 (file)
@@ -1028,7 +1028,7 @@ static int virCgroupAddTaskStrController(virCgroupPtr group,
     char *endp;
 
     if (!(str = strdup(pidstr)))
-        return -1;
+        return -ENOMEM;
 
     cur = str;
     while (*cur != '\0') {