threads / patch / 5257

patch, 28 partsremove conditional return

Subject: [PATCH 08/28] remove conditional return

## tl;dr

One message between Aug 14, 2006 and Aug 14, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

David Rientjes· Aug 14, 2006, 20:25 UTC · lore
Removes conditional return from builtin-pack-objects.c
		David
Signed-off-by: David Rientjes <rientjes@google.com>
---
 builtin-pack-objects.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
Show changes to builtin-pack-objects.c +1 −6
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 2f99212..eb287a2 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -138,12 +138,7 @@ static int cmp_offset(const void *a_, co
 {
 	unsigned long a = *(unsigned long *) a_;
 	unsigned long b = *(unsigned long *) b_;
-	if (a < b)
-		return -1;
-	else if (a == b)
-		return 0;
-	else
-		return 1;
+	return (a < b) ? -1 : !(a == b);
 }
 
 /*
-- 
1.4.2.g89bb-dirty

← back to recent threads