Source

linux-scalability-benchmarks / libowfat / mult / umult16.c

The default branch has multiple heads

Full commit
1
2
3
4
5
6
7
8
#include "safemult.h"

int umult16(uint16 a,uint16 b,uint16* c) {
  unsigned long x=(unsigned long)a*b;
  if (x>0xffff) return 0;
  *c=x&0xffff;
  return 1;
}