From 63010c26add860135af75337be6218b08bed9ee6 Mon Sep 17 00:00:00 2001 From: axel Date: Mon, 8 Jan 2007 00:24:30 +1000 Subject: [PATCH] Two very minor code touch ups darcs-hash:20070107142430-ac50b-20cd4fe96c03c052bb6fb5c07ce207a534e86498.gz --- builtin.c | 2 +- complete.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin.c b/builtin.c index f338d47b9..a0d0f6df3 100644 --- a/builtin.c +++ b/builtin.c @@ -3137,7 +3137,7 @@ int builtin_exists( wchar_t *cmd ) if( wcscmp( cmd, L"count" )==0) return 0; - return (hash_get(&builtin, cmd) != 0 ); + return !!hash_get(&builtin, cmd); } /** diff --git a/complete.c b/complete.c index 270d72741..22c15cf92 100644 --- a/complete.c +++ b/complete.c @@ -1228,14 +1228,14 @@ static void complete_cmd_desc( const wchar_t *cmd, array_list_t *comp ) continue; key = el+wcslen(cmd_start); - key_end = wcschr( el, L'\t' ); + key_end = wcschr( key, L'\t' ); if( !key_end ) continue; *key_end = 0; val_begin = key_end+1; - + /* And once again I make sure the first character is uppercased because I like it that way, and I get to decide these