X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.c;h=39d16c3a343ade4db21c9e5d9465728613403c7c;hp=38e25b09c5f3ff2b289d6e943a0f7bde3bfc23ad;hb=47a9983cc65ef57ad25c4ba3e16cabe48fd57b23;hpb=5cb5db1fbf8f9b96c3b5a1e0cc7de9e710757540 diff --git a/string.c b/string.c index 38e25b09..39d16c3a 100644 --- a/string.c +++ b/string.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2013 Andre Noll + * Copyright (C) 2004-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -36,7 +36,7 @@ * * \sa realloc(3). */ -__must_check __malloc void *para_realloc(void *p, size_t size) +__must_check void *para_realloc(void *p, size_t size) { /* * No need to check for NULL pointers: If p is NULL, the call @@ -298,24 +298,6 @@ __must_check char *para_basename(const char *name) return ret; } -/** - * Cut trailing newline. - * - * \param buf The string to be chopped. - * - * Replace the last character in \p buf by zero if it is equal to - * the newline character. - */ -void chop(char *buf) -{ - int n = strlen(buf); - - if (!n) - return; - if (buf[n - 1] == '\n') - buf[n - 1] = '\0'; -} - /** * Get the logname of the current user. *