projects
/
platform
/
upstream
/
elfutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.165
[platform/upstream/elfutils.git]
/
lib
/
xstrndup.c
diff --git
a/lib/xstrndup.c
b/lib/xstrndup.c
index
52304e6
..
92b79c1
100644
(file)
--- a/
lib/xstrndup.c
+++ b/
lib/xstrndup.c
@@
-1,5
+1,5
@@
/* Convenience function for string allocation.
/* 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
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 *
/* 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);
{
char *res;
size_t len = strnlen (string, n);