ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/branches/1.0.x/src/libopm/src/config.c
(Generate patch)

Comparing hopm/branches/1.0.x/src/libopm/src/config.c (file contents):
Revision 5923 by michael, Tue May 5 18:41:52 2015 UTC vs.
Revision 5924 by michael, Wed May 6 16:43:08 2015 UTC

# Line 167 | Line 167 | libopm_config_free(OPM_CONFIG_T *config)
167   */
168  
169   OPM_ERR_T
170 < libopm_config_set(OPM_CONFIG_T *config, int key, const void *value)
170 > libopm_config_set(OPM_CONFIG_T *config, unsigned int key, const void *value)
171   {
172 <  int num;
172 >  unsigned int num;
173    OPM_NODE_T *node;
174  
175    num = sizeof(HASH) / sizeof(OPM_CONFIG_HASH_T);
176  
177 <  if (key < 0 || key >= num)
177 >  if (key >= num)
178      return OPM_ERR_BADKEY;  /* Return appropriate error code eventually */
179  
180    switch (libopm_config_gettype(key))
# Line 246 | Line 246 | libopm_config_gettype(int key)
246   *    will have to be cast on the return end to be any use.
247   */
248   void *
249 < libopm_config(OPM_CONFIG_T *config, int key)
249 > libopm_config(OPM_CONFIG_T *config, unsigned int key)
250   {
251    return config->vars[key];
252   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines