aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-24 07:37:16 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-24 07:37:16 -0500
commitc671329681550e0b92aabafd284f9c508511714e (patch)
tree894c6b75ae0f5ec4477d703d9c4ad8eec1b67cc4 /sway/commands.c
parentcb11364552213e3dbfce8f8b0e90ce562b4e4c1f (diff)
parent9d50f88ceffc44f5ce0b83cc060bbae649ce898b (diff)
Merge pull request #248 from taiyu-len/master
fix list sorting
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 5b3b1d0f..f6d56bb4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1128,9 +1128,9 @@ static struct cmd_results *cmd_scratchpad(int argc, char **argv) {
// sort in order of longest->shortest
static int compare_set(const void *_l, const void *_r) {
- struct sway_variable * const *l = _l;
- struct sway_variable * const *r = _r;
- return strlen((*r)->name) - strlen((*l)->name);
+ struct sway_variable const *l = _l;
+ struct sway_variable const *r = _r;
+ return strlen(r->name) - strlen(l->name);
}
static struct cmd_results *cmd_set(int argc, char **argv) {