[vlc-devel] commit: variable lookup: missing const ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Jan 3 16:51:25 CET 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 3 17:51:04 2010 +0200| [25a196d7b75d026bcb83bba3f4d5f354ba1c89f9] | committer: Rémi Denis-Courmont
variable lookup: missing const
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25a196d7b75d026bcb83bba3f4d5f354ba1c89f9
---
src/misc/variables.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/misc/variables.c b/src/misc/variables.c
index dc504c6..84ebbe8 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -156,7 +156,7 @@ static int GetUnused ( vlc_object_t *, const char * );
static uint32_t HashString ( const char * );
static int Insert ( variable_t **, int, const char * );
static int InsertInner ( variable_t **, int, uint32_t );
-static int Lookup ( variable_t **, size_t, const char * );
+static int Lookup ( variable_t *const *, size_t, const char * );
static void CheckValue ( variable_t *, vlc_value_t * );
@@ -1263,7 +1263,8 @@ static int u32cmp( const void *key, const void *data )
* We use a recursive inner function indexed on the hash. Care is taken of
* possible hash collisions.
*****************************************************************************/
-static int Lookup( variable_t **pp_vars, size_t i_count, const char *psz_name )
+static int Lookup( variable_t *const *pp_vars, size_t i_count,
+ const char *psz_name )
{
variable_t **pp_var;
uint32_t i_hash;
@@ -1286,7 +1287,7 @@ static int Lookup( variable_t **pp_vars, size_t i_count, const char *psz_name )
/* Hash collision should be very unlikely, but we cannot guarantee
* it will never happen. So we do an exhaustive search amongst all
* entries with the same hash. Typically, there is only one anyway. */
- for( variable_t **p_end = pp_vars + i_count;
+ for( variable_t *const *p_end = pp_vars + i_count;
(pp_var < p_end) && (i_hash == (*pp_var)->i_hash);
pp_var++ )
{
More information about the vlc-devel
mailing list