Find a key in the rax, returns raxNotFound special void pointer value * if the item was not found, otherwise the value associated with the * item is returned. */
| 916 | * if the item was not found, otherwise the value associated with the |
| 917 | * item is returned. */ |
| 918 | void *raxFind(rax *rax, unsigned char *s, size_t len) { |
| 919 | raxNode *h; |
| 920 | |
| 921 | debugf("### Lookup: %.*s\n", (int)len, s); |
| 922 | int splitpos = 0; |
| 923 | size_t i = raxLowWalk(rax,s,len,&h,NULL,&splitpos,NULL); |
| 924 | if (i != len || (h->iscompr && splitpos != 0) || !h->iskey) |
| 925 | return raxNotFound; |
| 926 | return raxGetData(h); |
| 927 | } |
| 928 | |
| 929 | /* Return the memory address where the 'parent' node stores the specified |
| 930 | * 'child' pointer, so that the caller can update the pointer with another |
no test coverage detected