aboutsummaryrefslogtreecommitdiffstats
path: root/src/zseti.c
blob: d3514fb515152b46b2cbdbc1153bfd229714752d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* See LICENSE file for copyright and license details. */
#include "internals.h"


void
zseti(z_t a, long long int b)
{
	if (EXPECT(b >= 0, 0)) {
		zsetu(a, (unsigned long long int)b);
	} else {
		zsetu(a, (unsigned long long int)-b);
		SET_SIGNUM(a, -1);
	}
}