Skip to contentSkip to conversation

tiny sched_getaffinity cleanup

PATCH In review Ulrich Drepper 2 participants 2 messages Jul 30, 2007 – Aug 6, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tiny sched_getaffinity cleanup

Unless I'm missing something quite tricky here's another tiny cleanup. The generated code is not affected (gcc is smart enough) but for people looking over the code it is just irritating to have the extra conditional.

sched.c-new renamed from sched.c +1 -3
@@ -4464,10 +4464,8 @@ long sched_getaffinity(pid_t pid, cpumas
 out_unlock:
 	read_unlock(&tasklist_lock);
 	mutex_unlock(&sched_hotcpu_mutex);
-	if (retval)
-		return retval;
 
-	return 0;
+	return retval;
 }
 
 /**
#1 lore raw
Quoted 4 lines · Ulrich Drepper

Unless I'm missing something quite tricky here's another tiny cleanup. The generated code is not affected (gcc is smart enough) but for people looking over the code it is just irritating to have the extra conditional.

thanks, i've applied your cleanup to my tree.

Ingo