diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-04-24 14:20:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:16 -0500 |
commit | a30340affe789cd0c001e34c8e523fbba0742cfc (patch) | |
tree | f294f3a10c765cb694821f77183e392a203f66dc /source4/torture/raw | |
parent | e2e3a8e007ac2a9533f4205622a6e17d57845fcc (diff) | |
download | samba-a30340affe789cd0c001e34c8e523fbba0742cfc.tar.gz samba-a30340affe789cd0c001e34c8e523fbba0742cfc.tar.bz2 samba-a30340affe789cd0c001e34c8e523fbba0742cfc.zip |
r15201: Use abs() rather then ABS()
(This used to be commit 1f3833d041fddaf79cd19d4f236780a02e97f095)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/open.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/qfileinfo.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/qfsinfo.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 5dcb3cc9b6..2d4a6132d0 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -93,7 +93,7 @@ static const char *rdwr_string(enum rdwr_mode m) CHECK_STATUS(status, NT_STATUS_OK); \ t1 = t & ~1; \ t2 = nt_time_to_unix(finfo.all_info.out.field) & ~1; \ - if (ABS(t1-t2) > 2) { \ + if (abs(t1-t2) > 2) { \ printf("(%s) wrong time for field %s %s - %s\n", \ __location__, #field, \ timestring(mem_ctx, t1), \ diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index 6e10cc301c..f272190c44 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -73,7 +73,7 @@ static struct { static int dos_nt_time_cmp(time_t t, NTTIME nt) { time_t t2 = nt_time_to_unix(nt); - if (ABS(t2 - t) <= 2) return 0; + if (abs(t2 - t) <= 2) return 0; return t2 - t; } diff --git a/source4/torture/raw/qfsinfo.c b/source4/torture/raw/qfsinfo.c index 0a93f65b7a..2baabb8e9d 100644 --- a/source4/torture/raw/qfsinfo.c +++ b/source4/torture/raw/qfsinfo.c @@ -78,7 +78,7 @@ static union smb_fsinfo *find(const char *name) ret = False; \ }} while(0) -#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (ABS((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \ +#define VAL_APPROX_EQUAL(n1, v1, n2, v2) do {if (abs((int)(s1->n1.out.v1) - (int)(s2->n2.out.v2)) > 0.1*s1->n1.out.v1) { \ printf("%s/%s [%u] != %s/%s [%u] at %s(%d)\n", \ #n1, #v1, (uint_t)s1->n1.out.v1, \ #n2, #v2, (uint_t)s2->n2.out.v2, \ @@ -218,7 +218,7 @@ BOOL torture_raw_qfsinfo(struct torture_context *torture) s2->allocation.out.sectors_per_unit * s2->allocation.out.total_alloc_units * s2->allocation.out.bytes_per_sector / scale; - if (ABS(size1 - size2) > 1) { + if (abs(size1 - size2) > 1) { printf("Inconsistent total size in DSKATTR and ALLOCATION - size1=%.0f size2=%.0f\n", size1, size2); ret = False; @@ -240,7 +240,7 @@ BOOL torture_raw_qfsinfo(struct torture_context *torture) s2->allocation.out.sectors_per_unit * s2->allocation.out.avail_alloc_units * s2->allocation.out.bytes_per_sector / scale; - if (ABS(size1 - size2) > 1) { + if (abs(size1 - size2) > 1) { printf("Inconsistent avail size in DSKATTR and ALLOCATION - size1=%.0f size2=%.0f\n", size1, size2); ret = False; |