File: imult16.c

package info (click to toggle)
libowfat 0.28-6
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 4,068 kB
  • sloc: ansic: 12,863; makefile: 16
file content (8 lines) | stat: -rw-r--r-- 138 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
#include "safemult.h"

int imult16(int16 a,int16 b,int16* c) {
  int32 x=(int32)a*b;
  if ((int16)x != x) return 0;
  *c=x;
  return 1;
}