projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update RPM requires
[yaz-moved-to-github.git]
/
src
/
nmemsdup.c
diff --git
a/src/nmemsdup.c
b/src/nmemsdup.c
index
9584cff
..
f72936a
100644
(file)
--- a/
src/nmemsdup.c
+++ b/
src/nmemsdup.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-15,10
+15,10
@@
#include <string.h>
#include <yaz/nmem_xml.h>
#include <string.h>
#include <yaz/nmem_xml.h>
-char *nmem_strdup (NMEM mem, const char *src)
+char *nmem_strdup(NMEM mem, const char *src)
{
{
- char *dst = (char *)nmem_malloc (mem, strlen(src)+1);
- strcpy (dst, src);
+ char *dst = (char *) nmem_malloc(mem, strlen(src)+1);
+ strcpy(dst, src);
return dst;
}
return dst;
}
@@
-30,24
+30,24
@@
char *nmem_strdup_null(NMEM mem, const char *src)
return nmem_strdup(mem, src);
}
return nmem_strdup(mem, src);
}
-char *nmem_strdupn (NMEM mem, const char *src, size_t n)
+char *nmem_strdupn(NMEM mem, const char *src, size_t n)
{
{
- char *dst = (char *)nmem_malloc (mem, n+1);
- memcpy (dst, src, n);
+ char *dst = (char *) nmem_malloc(mem, n+1);
+ memcpy(dst, src, n);
dst[n] = '\0';
return dst;
}
nmem_int_t *nmem_intdup(NMEM mem, nmem_int_t v)
{
dst[n] = '\0';
return dst;
}
nmem_int_t *nmem_intdup(NMEM mem, nmem_int_t v)
{
- nmem_int_t *dst = (nmem_int_t*) nmem_malloc (mem, sizeof(*dst));
+ nmem_int_t *dst = (nmem_int_t*) nmem_malloc(mem, sizeof(*dst));
*dst = v;
return dst;
}
nmem_bool_t *nmem_booldup(NMEM mem, nmem_bool_t v)
{
*dst = v;
return dst;
}
nmem_bool_t *nmem_booldup(NMEM mem, nmem_bool_t v)
{
- nmem_bool_t *dst = (nmem_bool_t*) nmem_malloc (mem, sizeof(*dst));
+ nmem_bool_t *dst = (nmem_bool_t*) nmem_malloc(mem, sizeof(*dst));
*dst = v;
return dst;
}
*dst = v;
return dst;
}