I'm think about adding a test for overflow but not 100% sure.

Code:

/*
* Function to multiply two integers without using the * or / operators.
* Uses the "Egyptian Method" of multiplication.
*
* By Hodor, 2013
*
*/
#include <stdio.h>
#include <assert.h>
#define ZMIN(a,b) ( (a) < (b) ? (a) : (b) )
#define ZMAX(a,b) ( (a) > (b) ? (a) : (b) )
#define ZABS(n) ( (n) < 0 ? (-n) : (n) )
long multiply(int a, int b);
int main(void)
{
int i, j;
for (i = -6000; i < 6000; i++)
for (j = -6000; j < 6000; j++)
assert(multiply(i,j) == i*j);
return 0;
}
long multiply(int a, int b)
{
unsigned short aneg = a < 0, bneg = b < 0;
unsigned long total = 0;
unsigned long c = ZMIN(ZABS(a), ZABS(b)),
d = ZMAX(ZABS(a), ZABS(b));
while (c > 0) {
total += c & 1 ? d : 0;
c >>= 1;
d <<= 1;
}
return aneg ^ bneg ? -total : total;
}