summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-03-05 13:27:38 +0100
committerSimon Josefsson <simon@josefsson.org>2008-03-05 13:27:38 +0100
commitb49047b95047f35459a0b0bcd0926756561c8b12 (patch)
treec2d0e8f2e1bc39d7a0540d74f9f6c854ced49a53
parent61b484c9c09c15b6aeda703d88ed95a609efba0b (diff)
downloadgnutls-b49047b95047f35459a0b0bcd0926756561c8b12.tar.gz
Update gnulib files.
-rw-r--r--gl/getaddrinfo.c2
-rw-r--r--gl/getdelim.c6
-rw-r--r--lgl/alloca.in.h4
-rw-r--r--lgl/gc-gnulib.c3
-rw-r--r--lgl/xsize.h4
5 files changed, 11 insertions, 8 deletions
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
index 04f0ac2e4d..41ca185800 100644
--- a/gl/getaddrinfo.c
+++ b/gl/getaddrinfo.c
@@ -326,7 +326,7 @@ freeaddrinfo (struct addrinfo *ai)
cur = ai;
ai = ai->ai_next;
- if (cur->ai_canonname) free (cur->ai_canonname);
+ free (cur->ai_canonname);
free (cur);
}
}
diff --git a/gl/getdelim.c b/gl/getdelim.c
index 99b2ffd23a..beb131aef6 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -69,13 +69,15 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
if (*lineptr == NULL || *n == 0)
{
+ char *new_lineptr;
*n = 120;
- *lineptr = (char *) realloc (*lineptr, *n);
- if (*lineptr == NULL)
+ new_lineptr = (char *) realloc (*lineptr, *n);
+ if (new_lineptr == NULL)
{
result = -1;
goto unlock_return;
}
+ *lineptr = new_lineptr;
}
for (;;)
diff --git a/lgl/alloca.in.h b/lgl/alloca.in.h
index 1c1d9e68ed..38b20c3973 100644
--- a/lgl/alloca.in.h
+++ b/lgl/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2007 Free Software
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
@@ -42,6 +42,8 @@
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
+# elif defined __DECC && defined __VMS
+# define alloca __ALLOCA
# else
# include <stddef.h>
# ifdef __cplusplus
diff --git a/lgl/gc-gnulib.c b/lgl/gc-gnulib.c
index c199833774..ce4ff029c2 100644
--- a/lgl/gc-gnulib.c
+++ b/lgl/gc-gnulib.c
@@ -546,8 +546,7 @@ gc_cipher_close (gc_cipher_handle handle)
{
_gc_cipher_ctx *ctx = handle;
- if (ctx)
- free (ctx);
+ free (ctx);
return GC_OK;
}
diff --git a/lgl/xsize.h b/lgl/xsize.h
index 65356bb6c1..42db052f8f 100644
--- a/lgl/xsize.h
+++ b/lgl/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -94,7 +94,7 @@ xmax (size_t size1, size_t size2)
/* Multiplication of a count with an element size, with overflow check.
The count must be >= 0 and the element size must be > 0.
This is a macro, not an inline function, so that it works correctly even
- when N is of a wider tupe and N > SIZE_MAX. */
+ when N is of a wider type and N > SIZE_MAX. */
#define xtimes(N, ELSIZE) \
((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)