/[svn]/hopm/trunk/src/libopm/src/config.c
ViewVC logotype

Diff of /hopm/trunk/src/libopm/src/config.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.5922  
changed lines
  Added in v.5923

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28