Deleted Added
full compact
memalloc.c (193221) memalloc.c (200956)
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/memalloc.c 193221 2009-06-01 10:50:17Z rse $");
39__FBSDID("$FreeBSD: head/bin/sh/memalloc.c 200956 2009-12-24 18:41:14Z jilles $");
40
41#include <sys/param.h>
42#include "shell.h"
43#include "output.h"
44#include "memalloc.h"
45#include "error.h"
46#include "mystring.h"
47#include "expand.h"

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

90}
91
92
93/*
94 * Make a copy of a string in safe storage.
95 */
96
97char *
40
41#include <sys/param.h>
42#include "shell.h"
43#include "output.h"
44#include "memalloc.h"
45#include "error.h"
46#include "mystring.h"
47#include "expand.h"

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

90}
91
92
93/*
94 * Make a copy of a string in safe storage.
95 */
96
97char *
98savestr(char *s)
98savestr(const char *s)
99{
100 char *p;
101
102 p = ckmalloc(strlen(s) + 1);
103 scopy(s, p);
104 return p;
105}
106

--- 233 unchanged lines hidden ---
99{
100 char *p;
101
102 p = ckmalloc(strlen(s) + 1);
103 scopy(s, p);
104 return p;
105}
106

--- 233 unchanged lines hidden ---