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

Comparing hopm/trunk/src/libopm/src/libopm.c (file contents):
Revision 5672 by michael, Wed Mar 11 17:41:19 2015 UTC vs.
Revision 5673 by michael, Wed Mar 11 18:55:56 2015 UTC

# Line 197 | Line 197 | opm_remote_free(OPM_REMOTE_T *remote)
197   OPM_ERR_T
198   opm_callback(OPM_T *scanner, int type, OPM_CALLBACK_FUNC *function, void *data)
199   {
200 <  if (type < 0 || type >= (CBLEN + 1))
200 >  if (type < 0 || type >= CBLEN)
201      return OPM_ERR_CBNOTFOUND;
202  
203    scanner->callbacks[type].func = function;
# Line 1276 | Line 1276 | static void
1276   libopm_do_callback(OPM_T *scanner, OPM_REMOTE_T *remote, int type, int var)
1277   {
1278    /* Callback is out of range */
1279 <  if (type < 0 || type >= (CBLEN + 1))
1279 >  if (type < 0 || type >= CBLEN)
1280      return;
1281  
1282    if (scanner->callbacks[type].func)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines