Deleted Added
full compact
inflate.c (93149) inflate.c (109623)
1/*
2 * Most parts of this file are not covered by:
3 * ----------------------------------------------------------------------------
4 * "THE BEER-WARE LICENSE" (Revision 42):
5 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
6 * can do whatever you want with this stuff. If we meet some day, and you think
7 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
8 * ----------------------------------------------------------------------------
9 *
1/*
2 * Most parts of this file are not covered by:
3 * ----------------------------------------------------------------------------
4 * "THE BEER-WARE LICENSE" (Revision 42):
5 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
6 * can do whatever you want with this stuff. If we meet some day, and you think
7 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
8 * ----------------------------------------------------------------------------
9 *
10 * $FreeBSD: head/sys/kern/inflate.c 93149 2002-03-25 13:52:45Z phk $
10 * $FreeBSD: head/sys/kern/inflate.c 109623 2003-01-21 08:56:16Z alfred $
11 *
12 *
13 */
14
15#include <sys/param.h>
16#include <sys/inflate.h>
17#ifdef _KERNEL
18#include <sys/systm.h>

--- 527 unchanged lines hidden (view full) ---

546 if ((unsigned) w + j > el && (unsigned) w < el)
547 j = el - w; /* make EOB code end at
548 * table */
549 z = 1 << j; /* table entries for j-bit
550 * table */
551 l[h] = j; /* set table size in stack */
552
553 /* allocate and link in new table */
11 *
12 *
13 */
14
15#include <sys/param.h>
16#include <sys/inflate.h>
17#ifdef _KERNEL
18#include <sys/systm.h>

--- 527 unchanged lines hidden (view full) ---

546 if ((unsigned) w + j > el && (unsigned) w < el)
547 j = el - w; /* make EOB code end at
548 * table */
549 z = 1 << j; /* table entries for j-bit
550 * table */
551 l[h] = j; /* set table size in stack */
552
553 /* allocate and link in new table */
554 if ((q = (struct huft *) malloc((z + 1) * sizeof(struct huft), M_GZIP, M_WAITOK)) ==
554 if ((q = (struct huft *) malloc((z + 1) * sizeof(struct huft), M_GZIP, 0)) ==
555 (struct huft *) NULL) {
556 if (h)
557 huft_free(glbl, u[0]);
558 return 3; /* not enough memory */
559 }
560 glbl->gz_hufts += z + 1; /* track memory usage */
561 *t = q + 1; /* link to list for
562 * huft_free() */

--- 481 unchanged lines hidden (view full) ---

1044inflate(glbl)
1045 struct inflate *glbl;
1046{
1047 int i;
1048#ifdef _KERNEL
1049 u_char *p = NULL;
1050
1051 if (!glbl->gz_slide)
555 (struct huft *) NULL) {
556 if (h)
557 huft_free(glbl, u[0]);
558 return 3; /* not enough memory */
559 }
560 glbl->gz_hufts += z + 1; /* track memory usage */
561 *t = q + 1; /* link to list for
562 * huft_free() */

--- 481 unchanged lines hidden (view full) ---

1044inflate(glbl)
1045 struct inflate *glbl;
1046{
1047 int i;
1048#ifdef _KERNEL
1049 u_char *p = NULL;
1050
1051 if (!glbl->gz_slide)
1052 p = glbl->gz_slide = malloc(GZ_WSIZE, M_GZIP, M_WAITOK);
1052 p = glbl->gz_slide = malloc(GZ_WSIZE, M_GZIP, 0);
1053#endif
1054 if (!glbl->gz_slide)
1055#ifdef _KERNEL
1056 return(ENOMEM);
1057#else
1058 return 3; /* kzip expects 3 */
1059#endif
1060 i = xinflate(glbl);

--- 18 unchanged lines hidden ---
1053#endif
1054 if (!glbl->gz_slide)
1055#ifdef _KERNEL
1056 return(ENOMEM);
1057#else
1058 return 3; /* kzip expects 3 */
1059#endif
1060 i = xinflate(glbl);

--- 18 unchanged lines hidden ---