Update.
[glibc.git] / db2 / log / log_compare.c
blob320b34af4d739c819f4cb07099fa236893ffa7e9
1 /*-
2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996, 1997, 1998
5 * Sleepycat Software. All rights reserved.
6 */
7 #include "config.h"
9 #ifndef lint
10 static const char sccsid[] = "@(#)log_compare.c 10.3 (Sleepycat) 4/10/98";
11 #endif /* not lint */
13 #ifndef NO_SYSTEM_INCLUDES
14 #include <sys/types.h>
15 #endif
17 #include "db_int.h"
20 * log_compare --
21 * Compare two LSN's.
23 int
24 log_compare(lsn0, lsn1)
25 const DB_LSN *lsn0, *lsn1;
27 if (lsn0->file != lsn1->file)
28 return (lsn0->file < lsn1->file ? -1 : 1);
30 if (lsn0->offset != lsn1->offset)
31 return (lsn0->offset < lsn1->offset ? -1 : 1);
33 return (0);