bluetooth.c (121054) | bluetooth.c (126643) |
---|---|
1/* 2 * bluetooth.c 3 * 4 * Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: bluetooth.c,v 1.3 2003/05/20 23:04:30 max Exp $ | 1/* 2 * bluetooth.c 3 * 4 * Copyright (c) 2001-2003 Maksim Yevmenkin <m_evmenkin@yahoo.com> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * $Id: bluetooth.c,v 1.3 2003/05/20 23:04:30 max Exp $ |
29 * $FreeBSD: head/lib/libbluetooth/bluetooth.c 121054 2003-10-12 22:04:24Z emax $ | 29 * $FreeBSD: head/lib/libbluetooth/bluetooth.c 126643 2004-03-05 08:10:19Z markm $ |
30 */ 31 32#include <bluetooth.h> 33#include <stdio.h> 34#include <stdlib.h> 35#include <string.h> 36 37#define _PATH_BT_HOSTS "/etc/bluetooth/hosts" --- 248 unchanged lines hidden (view full) --- 286bt_aton(char const *str, bdaddr_t *ba) 287{ 288 int i, b; 289 char *end = NULL; 290 291 memset(ba, 0, sizeof(*ba)); 292 293 for (i = 5, end = strchr(str, ':'); | 30 */ 31 32#include <bluetooth.h> 33#include <stdio.h> 34#include <stdlib.h> 35#include <string.h> 36 37#define _PATH_BT_HOSTS "/etc/bluetooth/hosts" --- 248 unchanged lines hidden (view full) --- 286bt_aton(char const *str, bdaddr_t *ba) 287{ 288 int i, b; 289 char *end = NULL; 290 291 memset(ba, 0, sizeof(*ba)); 292 293 for (i = 5, end = strchr(str, ':'); |
294 i > 0 && *str != NULL && end != NULL; | 294 i > 0 && *str != '\0' && end != NULL; |
295 i --, str = end + 1, end = strchr(str, ':')) { 296 switch (end - str) { 297 case 1: 298 b = bt_hex_nibble(str[0]); 299 break; 300 301 case 2: 302 b = bt_hex_byte(str); --- 67 unchanged lines hidden --- | 295 i --, str = end + 1, end = strchr(str, ':')) { 296 switch (end - str) { 297 case 1: 298 b = bt_hex_nibble(str[0]); 299 break; 300 301 case 2: 302 b = bt_hex_byte(str); --- 67 unchanged lines hidden --- |