Deleted Added
full compact
bootp.c (193189) bootp.c (229403)
1/* $NetBSD: bootp.c,v 1.14 1998/02/16 11:10:54 drochner Exp $ */
2
3/*
4 * Copyright (c) 1992 Regents of the University of California.
5 * All rights reserved.
6 *
7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and

--- 22 unchanged lines hidden (view full) ---

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#) Header: bootp.c,v 1.4 93/09/11 03:13:51 leres Exp (LBL)
36 */
37
38#include <sys/cdefs.h>
1/* $NetBSD: bootp.c,v 1.14 1998/02/16 11:10:54 drochner Exp $ */
2
3/*
4 * Copyright (c) 1992 Regents of the University of California.
5 * All rights reserved.
6 *
7 * This software was developed by the Computer Systems Engineering group
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and

--- 22 unchanged lines hidden (view full) ---

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#) Header: bootp.c,v 1.4 93/09/11 03:13:51 leres Exp (LBL)
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/lib/libstand/bootp.c 193189 2009-05-31 21:29:07Z ed $");
39__FBSDID("$FreeBSD: head/lib/libstand/bootp.c 229403 2012-01-03 18:51:58Z ed $");
40
41#include <sys/types.h>
42#include <netinet/in.h>
43#include <netinet/in_systm.h>
44
45#include <string.h>
46
47#define BOOTP_DEBUGxx

--- 650 unchanged lines hidden (view full) ---

698 case __INDIR: /* name=value */
699 case __ILIST: /* name=value;name=value... */
700 bcopy(cp, buf, size); /* cannot overflow */
701 buf[size] = '\0';
702 for (endv = buf; endv; endv = vp) {
703 u_char *s = NULL; /* semicolon ? */
704
705 /* skip leading whitespace */
40
41#include <sys/types.h>
42#include <netinet/in.h>
43#include <netinet/in_systm.h>
44
45#include <string.h>
46
47#define BOOTP_DEBUGxx

--- 650 unchanged lines hidden (view full) ---

698 case __INDIR: /* name=value */
699 case __ILIST: /* name=value;name=value... */
700 bcopy(cp, buf, size); /* cannot overflow */
701 buf[size] = '\0';
702 for (endv = buf; endv; endv = vp) {
703 u_char *s = NULL; /* semicolon ? */
704
705 /* skip leading whitespace */
706 while (*endv && index(" \t\n\r", *endv))
706 while (*endv && strchr(" \t\n\r", *endv))
707 endv++;
707 endv++;
708 vp = index(endv, '='); /* find name=value separator */
708 vp = strchr(endv, '='); /* find name=value separator */
709 if (!vp)
710 break;
711 *vp++ = 0;
709 if (!vp)
710 break;
711 *vp++ = 0;
712 if (op->fmt == __ILIST && (s = index(vp, ';')))
712 if (op->fmt == __ILIST && (s = strchr(vp, ';')))
713 *s++ = '\0';
714 setenv(endv, vp, 1);
715 vp = s; /* prepare for next round */
716 }
717 buf[0] = '\0'; /* option already done */
718 }
719
720 if (tp - tags < sizeof(tags) - 5) { /* add tag to the list */

--- 22 unchanged lines hidden ---
713 *s++ = '\0';
714 setenv(endv, vp, 1);
715 vp = s; /* prepare for next round */
716 }
717 buf[0] = '\0'; /* option already done */
718 }
719
720 if (tp - tags < sizeof(tags) - 5) { /* add tag to the list */

--- 22 unchanged lines hidden ---