summaryrefslogtreecommitdiffstats
path: root/pbn_abs.c
blob: e78a77f86ee02a02509d821719d47961c5907560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ----------------------------------------------------------------------- *
 *
 *   Copyright 2007 H. Peter Anvin - All Rights Reserved
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as
 *   published by the Free Software Foundation, Inc.,
 *   59 Temple Place Ste 330, Boston MA 02111-1307, USA; version 2.1,
 *   incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

/*
 * pbn_abs.c
 */

#include "pbnint.h"

struct pbn *pbn_abs(struct pbn *pbn)
{
    if (!pbn->minus)
	return pbn;

    pbn = pbn_cow(pbn, pbn->len);
    pbn->minus = 0;
    return pbn;
}