[gnome-software/wip/temp/ubuntu-xenial-rebased: 107/326] Improve variable names / comment
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased: 107/326] Improve variable names / comment
- Date: Fri, 29 Apr 2016 09:56:19 +0000 (UTC)
commit ee292ec968c3e9fe45f101909cd0877ac5daa98e
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Feb 17 08:41:38 2016 -0800
Improve variable names / comment
src/plugins/gs-plugin-apt.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.c b/src/plugins/gs-plugin-apt.c
index 98185a9..e14e6cf 100644
--- a/src/plugins/gs-plugin-apt.c
+++ b/src/plugins/gs-plugin-apt.c
@@ -106,11 +106,11 @@ compare_version (const char *v0, const char *v1)
// Compare non-digits based on ordering rules
while ((valid_char (*v0) && !isdigit (*v0)) || (valid_char (*v1) && !isdigit (*v1))) {
- int ac = order (*v0);
- int bc = order (*v1);
+ int o0 = order (*v0);
+ int o1 = order (*v1);
- if (ac != bc)
- return ac - bc;
+ if (o0 != o1)
+ return o0 - o1;
v0++;
v1++;
@@ -122,7 +122,7 @@ compare_version (const char *v0, const char *v1)
while (*v1 == '0')
v1++;
- // Compare numbers - longest wins, otherwise compare next digit
+ // Compare numbers - longest wins, otherwise compare first digit
while (isdigit (*v0) && isdigit (*v1)) {
if (first_diff == 0)
first_diff = *v0 - *v1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]