diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-11-24 07:37:16 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-11-24 07:37:16 -0500 |
commit | c671329681550e0b92aabafd284f9c508511714e (patch) | |
tree | 894c6b75ae0f5ec4477d703d9c4ad8eec1b67cc4 /sway/commands.c | |
parent | cb11364552213e3dbfce8f8b0e90ce562b4e4c1f (diff) | |
parent | 9d50f88ceffc44f5ce0b83cc060bbae649ce898b (diff) |
Merge pull request #248 from taiyu-len/master
fix list sorting
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 6 |
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) { |