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
yaz-iconv: fix typos
[yaz-moved-to-github.git]
/
src
/
errno.c
diff --git
a/src/errno.c
b/src/errno.c
index
3beb6dd
..
95af155
100644
(file)
--- a/
src/errno.c
+++ b/
src/errno.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
@@
-38,7
+38,7
@@
void yaz_set_errno(int v)
errno = v;
}
errno = v;
}
-void yaz_strerror(char *buf, int max)
+void yaz_strerror(char *buf, size_t bufsz)
{
#ifdef WIN32
DWORD err;
{
#ifdef WIN32
DWORD err;
@@
-54,7
+54,7
@@
void yaz_strerror(char *buf, int max)
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default lang */
(LPTSTR) buf,
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default lang */
(LPTSTR) buf,
- max-1,
+ bufsz-1,
NULL);
}
else
NULL);
}
else
@@
-63,7
+63,7
@@
void yaz_strerror(char *buf, int max)
/* UNIX */
#if HAVE_STRERROR_R
*buf = '\0';
/* UNIX */
#if HAVE_STRERROR_R
*buf = '\0';
- strerror_r(errno, buf, max);
+ strerror_r(errno, buf, bufsz);
/* if buffer is unset - use strerror anyway (GLIBC bug) */
if (*buf == '\0')
strcpy(buf, strerror(yaz_errno()));
/* if buffer is unset - use strerror anyway (GLIBC bug) */
if (*buf == '\0')
strcpy(buf, strerror(yaz_errno()));