mac.c (738824ad6c2dd56a9e49d3327f4c4376a4b775e4) mac.c (930d4ffa56b3e88135c41f592c7d85b2ef089cf6)
1/*
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed by Robert Watson for the TrustedBSD Project.
7 *
8 * This software was developed for the FreeBSD Project in part by Network

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

326
327 *text = strdup(mac->m_string);
328 if (*text == NULL)
329 return (ENOMEM);
330 return (0);
331}
332
333int
1/*
2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson
3 * Copyright (c) 2002, 2003 Networks Associates Technology, Inc.
4 * All rights reserved.
5 *
6 * This software was developed by Robert Watson for the TrustedBSD Project.
7 *
8 * This software was developed for the FreeBSD Project in part by Network

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

326
327 *text = strdup(mac->m_string);
328 if (*text == NULL)
329 return (ENOMEM);
330 return (0);
331}
332
333int
334mac_prepare(struct mac **mac, char *elements)
334mac_prepare(struct mac **mac, const char *elements)
335{
336
337 if (strlen(elements) >= MAC_MAX_LABEL_BUF_LEN)
338 return (EINVAL);
339
340 *mac = (struct mac *) malloc(sizeof(**mac));
341 if (*mac == NULL)
342 return (ENOMEM);

--- 119 unchanged lines hidden ---
335{
336
337 if (strlen(elements) >= MAC_MAX_LABEL_BUF_LEN)
338 return (EINVAL);
339
340 *mac = (struct mac *) malloc(sizeof(**mac));
341 if (*mac == NULL)
342 return (ENOMEM);

--- 119 unchanged lines hidden ---