pmclog.c (185363) | pmclog.c (208860) |
---|---|
1/*- 2 * Copyright (c) 2005-2007 Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005-2007 Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/lib/libpmc/pmclog.c 185363 2008-11-27 09:00:47Z jkoshy $"); | 32__FBSDID("$FreeBSD: head/lib/libpmc/pmclog.c 208860 2010-06-05 23:00:02Z fabient $"); |
33 34#include <sys/param.h> 35#include <sys/pmc.h> 36#include <sys/pmclog.h> 37 38#include <assert.h> 39#include <errno.h> 40#include <pmc.h> --- 503 unchanged lines hidden (view full) --- 544 ps->ps_svcount = 0; 545 ps->ps_fd = fd; 546 ps->ps_data = NULL; 547 ps->ps_buffer = NULL; 548 ps->ps_len = 0; 549 550 /* allocate space for a work area */ 551 if (ps->ps_fd != PMCLOG_FD_NONE) { | 33 34#include <sys/param.h> 35#include <sys/pmc.h> 36#include <sys/pmclog.h> 37 38#include <assert.h> 39#include <errno.h> 40#include <pmc.h> --- 503 unchanged lines hidden (view full) --- 544 ps->ps_svcount = 0; 545 ps->ps_fd = fd; 546 ps->ps_data = NULL; 547 ps->ps_buffer = NULL; 548 ps->ps_len = 0; 549 550 /* allocate space for a work area */ 551 if (ps->ps_fd != PMCLOG_FD_NONE) { |
552 if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL) | 552 if ((ps->ps_buffer = malloc(PMCLOG_BUFFER_SIZE)) == NULL) { 553 free(ps); |
553 return NULL; | 554 return NULL; |
555 } |
|
554 } 555 556 return ps; 557} 558 559 560/* 561 * Free up parser state. --- 14 unchanged lines hidden --- | 556 } 557 558 return ps; 559} 560 561 562/* 563 * Free up parser state. --- 14 unchanged lines hidden --- |