[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 107/331] Improve variable names / comment
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 107/331] Improve variable names / comment
- Date: Wed, 4 May 2016 14:07:31 +0000 (UTC)
commit ba555eb5d3a5dfc7f1c699fc8901a7eebfc80ff0
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]