summaryrefslogtreecommitdiff
path: root/lib/xstrndup.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-09-22 22:27:01 +0200
committerMark Wielaard <mjw@redhat.com>2015-09-23 15:50:55 +0200
commit1ccdfb683ad6c7e59793136c3a657ddf131cafd1 (patch)
treed5d24ce4ca0beec37e1ee2fe1f8a36af0e218e28 /lib/xstrndup.c
parente260d79d73be07aee2860c5a5baf4f12c230ad6b (diff)
downloadelfutils-1ccdfb683ad6c7e59793136c3a657ddf131cafd1.tar.gz
Remove old-style function definitions.
We already require -std=gnu99 and old-style function definitions might hide some compiler warnings. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'lib/xstrndup.c')
-rw-r--r--lib/xstrndup.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/xstrndup.c b/lib/xstrndup.c
index 52304e65..92b79c17 100644
--- a/lib/xstrndup.c
+++ b/lib/xstrndup.c
@@ -1,5 +1,5 @@
/* Convenience function for string allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -36,9 +36,7 @@
/* Return a newly allocated copy of STRING. */
char *
-xstrndup (string, n)
- const char *string;
- size_t n;
+xstrndup (const char *string, size_t n)
{
char *res;
size_t len = strnlen (string, n);