summaryrefslogtreecommitdiffstats
path: root/lib/xstrndup.c
diff options
context:
space:
mode:
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);