diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2015-08-21 15:55:40 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2015-08-21 15:55:40 +0000 |
commit | ad59bb627fa5bee245bf4fe04a7dbebba01570b9 (patch) | |
tree | 8f3408e58e7b87de819be2dcc25e02f2069177ca | |
parent | 3fc9d10a3e177a15a4df06fd7ba9be6ee5fb2fc7 (diff) |
Leave command list order from .cwmrc alone; remove sort.
-rw-r--r-- | app/cwm/conf.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/app/cwm/conf.c b/app/cwm/conf.c index 97df67411..34ebde94b 100644 --- a/app/cwm/conf.c +++ b/app/cwm/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.192 2015/08/20 14:45:15 okan Exp $ + * $OpenBSD: conf.c,v 1.193 2015/08/21 15:55:39 okan Exp $ */ #include <sys/types.h> @@ -40,7 +40,7 @@ static void conf_unbind_mouse(struct conf *, struct binding *); int conf_cmd_add(struct conf *c, const char *name, const char *path) { - struct cmd *cmd, *prev; + struct cmd *cmd; cmd = xmalloc(sizeof(*cmd)); @@ -55,13 +55,6 @@ conf_cmd_add(struct conf *c, const char *name, const char *path) TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry); - /* keep queue sorted by name */ - while ((prev = TAILQ_PREV(cmd, cmd_q, entry)) && - (strcmp(prev->name, cmd->name) > 0)) { - TAILQ_REMOVE(&c->cmdq, cmd, entry); - TAILQ_INSERT_BEFORE(prev, cmd, entry); - } - return(1); } |