1/* 2 * Copyright 2014, NICTA 3 * 4 * This software may be distributed and modified according to the terms of 5 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 6 * See "LICENSE_BSD2.txt" for details. 7 * 8 * @TAG(NICTA_BSD) 9 */ 10 11void swap(int *i1, int *i2) 12{ 13 int tmp; 14 tmp = *i1; 15 *i1 = *i2; 16 *i2 = tmp; 17} 18 19int f(void) 20{ 21 int i = 1; 22 int j = 2; 23 24 swap(&i, &j); 25 return j; 26} 27