Includes some potentially bad pointer/int conversions
/*
* Macro to get pointer to structure if pointer to some element is known
*/
-#define GETBASE(p,s,e) ((struct s *) ((char *)(p) - (int)&((struct s *)0)->e))
+#define GETBASE(p,s,e) ((struct s *) ((char *)(p) - (char *)&((struct s *)0)->e))
/* In memory sorting object */
typedef struct issort {
/* Load the entire string. */
memcpy((void *) dst, (const void *) src, len);
- *(dst + len) = NULL;
+ *(dst + len) = '\0';
}
int
#define ISHASHHDRS 256 /* Must be a power of two */
#define ISHASHMASK (ISHASHHDRS-1)
-#define __hashblkno(fcb,blkno) (((int)(fcb)+(blkno)) & ISHASHMASK)
+#define __hashblkno(fcb,blkno) (((size_t)(fcb)+(blkno)) & ISHASHMASK)
#define base ((char *)0)
#include "isam_impl.h"
#include <sys/time.h>
+#include <stdlib.h>
static int _amstart();
/* Clean-up work. */
if (newcrp != NULL)
- free((char *)newcrp);
+ free(newcrp);
_isdisk_commit(); /* This will only check
* that we unfixed all fixed