pike.git / src / pike_memory.h

version» Context lines:

pike.git/src/pike_memory.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: pike_memory.h,v 1.29 2000/12/13 21:31:53 hubbe Exp $ +  * $Id: pike_memory.h,v 1.30 2010/09/21 15:25:53 grubba Exp $    */   #ifndef MEMORY_H   #define MEMORY_H      #include "global.h"   #include "stralloc.h"            #define MEMSEARCH_LINKS 512
pike.git/src/pike_memory.h:134:      /* NB: RET should be an lvalue of type size_t. */   #define DO_HASHMEM(RET, A, LEN, MLEN) \    do { \    const unsigned char *a = A; \    size_t len = LEN; \    size_t mlen = MLEN; \    size_t ret; \    \    ret = 9248339*len; \ -  if(len<mlen) \ +  if(len<=mlen) \    mlen=len; \    else \    { \    switch(len-mlen) \    { \    default: ret^=(ret<<6) + a[len-7]; \    case 7: \    case 6: ret^=(ret<<7) + a[len-5]; \    case 5: \    case 4: ret^=(ret<<4) + a[len-4]; \