/* * Copyright (C) 2014-2015 Tobias Klauser * Copyright (C) 2009-2012 Daniel Borkmann * * This file is part of llmnrd. * * llmnrd is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. * * llmnrd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with llmnrd. If not, see . */ #include #include #include "util.h" void *xmalloc(size_t size) { void *ptr; if (size == 0) panic("malloc: size 0\n"); ptr = malloc(size); if (!ptr) panic("malloc: out of memory\n"); return ptr; } void *xzalloc(size_t size) { void *ptr = xmalloc(size); memset(ptr, 0, size); return ptr; } void *xrealloc(void *ptr, size_t size) { void *newptr; if (size == 0) panic("realloc: size 0\n"); newptr = realloc(ptr, size); if (!newptr) { free(ptr); panic("realloc: out of memory\n"); } return newptr; } char *xstrdup(const char *s) { size_t len = strlen(s) + 1; char *ret = xmalloc(len); memcpy(ret, s, len); return ret; } t' value='switch'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2016-04-19 18:10:07 -0700
committerMark Brown <broonie@kernel.org>2016-04-20 10:14:20 +0100
commit280af2b8eb3674628223b8d143b5f71cd2a96159 (patch)
tree18b70ee185e8d42be3440c50bf1c54acebc8a258 /Documentation/i2c
parenta52db659c79ceede44e2d5ca63ca058d49df8dea (diff)
spi: spi-pxa2xx: Remove CLK_IS_ROOT
This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Daniel Mack <daniel@zonque.org> Cc: Haojian Zhuang <haojian.zhuang@gmail.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/i2c')