1 : /*
2 : * This file is part of MIN Test Framework. Copyright © 2008 Nokia Corporation
3 : * and/or its subsidiary(-ies).
4 : * Contact: Sampo Saaristo
5 : * Contact e-mail: DG.MIN-Support@nokia.com
6 : *
7 : * This program is free software: you can redistribute it and/or modify it
8 : * under the terms of the GNU General Public License as published by the Free
9 : * Software Foundation, version 2 of the License.
10 : *
11 : * This program is distributed in the hope that it will be useful, but WITHOUT
12 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 : * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 : * more details. You should have received a copy of the GNU General Public
15 : * License along with this program. If not, see
16 : * <http://www.gnu.org/licenses/>.
17 : */
18 :
19 :
20 : /**
21 : * @file equal.c
22 : * @version 0.1
23 : * @brief equal utility used in dllist tests
24 : */
25 :
26 : /* ------------------------------------------------------------------------- */
27 : /* INCLUDE FILES */
28 : /* ------------------------------------------------------------------------- */
29 : /* EXTERNAL DATA STRUCTURES */
30 : /* None */
31 :
32 : /* ------------------------------------------------------------------------- */
33 : /* EXTERNAL GLOBAL VARIABLES */
34 : /* None */
35 :
36 : /* ------------------------------------------------------------------------- */
37 : /* EXTERNAL FUNCTION PROTOTYPES */
38 : /* None */
39 :
40 : /* ------------------------------------------------------------------------- */
41 : /* GLOBAL VARIABLES */
42 : /* None */
43 :
44 : /* ------------------------------------------------------------------------- */
45 : /* CONSTANTS */
46 : /* None */
47 :
48 : /* ------------------------------------------------------------------------- */
49 : /* MACROS */
50 : /* None */
51 : /* ------------------------------------------------------------------------- */
52 : /* LOCAL GLOBAL VARIABLES */
53 : /* None */
54 :
55 : /* ------------------------------------------------------------------------- */
56 : /* LOCAL CONSTANTS AND MACROS */
57 : /* None */
58 :
59 : /* ------------------------------------------------------------------------- */
60 : /* MODULE DATA STRUCTURES */
61 : /* None */
62 :
63 : /* ------------------------------------------------------------------------- */
64 : /* LOCAL FUNCTION PROTOTYPES */
65 :
66 : /* ------------------------------------------------------------------------- */
67 : /* FORWARD DECLARATIONS */
68 : /* None */
69 :
70 : /* ==================== LOCAL FUNCTIONS ==================================== */
71 : /* ------------------------------------------------------------------------- */
72 :
73 :
74 : /* ------------------------------------------------------------------------- */
75 : /* ======================== FUNCTIONS ====================================== */
76 : /* ------------------------------------------------------------------------- */
77 : int equal (const void *a, const void *b)
78 10 : {
79 10 : if (*((int *)a) == *((int *)b))
80 4 : return 0;
81 : else
82 6 : return -1;
83 : }
84 :
85 : /* ------------------------------------------------------------------------- */
86 : /* ================= OTHER EXPORTED FUNCTIONS ============================== */
87 : /* None */
88 :
89 : /* ------------------------------------------------------------------------- */
90 : /* End of file */
|