blob: 2ad01211658cc1463924bdad6a619778236c659f (
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
|
/* This file provides auxilliary functions for c_ptr_tests_8. */
#include <stdio.h>
#include <stdlib.h>
extern void abort (void);
void *create (void)
{
int *a;
a = malloc (sizeof (a));
*a = 444;
return a;
}
void show (int *a)
{
if (*a == 444)
printf ("SUCCESS (%d)\n", *a);
else
{
printf ("FAILED: Expected 444, received %d\n", *a);
abort ();
}
}
|