Module Name: src
Committed By: plunky
Date: Thu May 21 14:44:01 UTC 2009
Modified Files:
src/usr.bin/rfcomm_sppd: rfcomm_sppd.c
Log Message:
use system provided MAX(a, b) macro instead of defining our own
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/rfcomm_sppd/rfcomm_sppd.c
diff -u src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.10 src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.11
--- src/usr.bin/rfcomm_sppd/rfcomm_sppd.c:1.10 Tue May 12 18:43:35 2009
+++ src/usr.bin/rfcomm_sppd/rfcomm_sppd.c Thu May 21 14:44:01 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: rfcomm_sppd.c,v 1.10 2009/05/12 18:43:35 plunky Exp $ */
+/* $NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -62,7 +62,9 @@
Copyright (c) 2006 Itronix, Inc.\
Copyright (c) 2003 Maksim Yevmenkin [email protected].\
All rights reserved.");
-__RCSID("$NetBSD: rfcomm_sppd.c,v 1.10 2009/05/12 18:43:35 plunky Exp $");
+__RCSID("$NetBSD: rfcomm_sppd.c,v 1.11 2009/05/21 14:44:01 plunky Exp $");
+
+#include <sys/param.h>
#include <bluetooth.h>
#include <ctype.h>
@@ -84,8 +86,6 @@
#include <netbt/rfcomm.h>
-#define max(a, b) ((a) > (b) ? (a) : (b))
-
int open_tty(const char *);
int open_client(bdaddr_t *, bdaddr_t *, int, const char *);
int open_server(bdaddr_t *, uint8_t, int, const char *);
@@ -248,7 +248,7 @@
openlog(getprogname(), LOG_PERROR | LOG_PID, LOG_DAEMON);
syslog(LOG_INFO, "Starting on %s...", (tty ? tty : "stdio"));
- n = max(tty_in, rfcomm) + 1;
+ n = MAX(tty_in, rfcomm) + 1;
while (!done) {
FD_ZERO(&rdset);
FD_SET(tty_in, &rdset);