The return value from nice() is being checked for less than 0 for
an error condition, when it should be checking for "-1". This
removes the bogus iscsid startup error message "Could not increase
process priority: Success".

Signed-off-by: Lee Duncan <[email protected]>
---
 usr/iscsi_util.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c
index 5e3420e..1d3a81f 100644
--- a/usr/iscsi_util.c
+++ b/usr/iscsi_util.c
@@ -60,7 +60,7 @@ int oom_adjust(void)
        char path[ISCSI_OOM_PATH_LEN];
        struct stat statb;
 
-       if (nice(-10) < 0)
+       if (nice(-10) == -1)
                log_debug(1, "Could not increase process priority: %s",
                          strerror(errno));
 
-- 
1.7.10.4

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to