summaryrefslogtreecommitdiff
path: root/ufs/alloc.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-23 18:17:36 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-23 18:17:36 +0000
commit4e2aa139eaca196f8479e52bb73a30029d534a8e (patch)
treedb97884cb5ae697a56062cf047ef33862a7d6c45 /ufs/alloc.c
parent675192bc5f687f4956da875ef1c54a5e61bf5d54 (diff)
Include <string.h>.
Fixup.
Diffstat (limited to 'ufs/alloc.c')
-rw-r--r--ufs/alloc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ufs/alloc.c b/ufs/alloc.c
index fdd0aa59..9efd2eb3 100644
--- a/ufs/alloc.c
+++ b/ufs/alloc.c
@@ -55,6 +55,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ufs.h"
#include <stdio.h>
+#include <string.h>
+
/* These don't work *at all* here; don't even try setting them. */
#undef DIAGNOSTIC
@@ -91,7 +93,7 @@ alloc_sync (struct node *np)
/* Byteswap everything in CGP. */
void
-swab_cg (struct cg *cgp)
+swab_cg (struct cg *cg)
{
int i, j;
@@ -177,14 +179,14 @@ read_cg (int cg, struct cg **cgpp)
if (swab_disk)
{
- *cgp = malloc (sblock->fs_cgsize);
- bcopy (diskcg, *cgp, sblock->fs_cgsize);
- swab_cg (*cgp);
+ *cgpp = malloc (sblock->fs_cgsize);
+ bcopy (diskcg, *cgpp, sblock->fs_cgsize);
+ swab_cg (*cgpp);
return 1;
}
else
{
- *cgp = diskcg;
+ *cgpp = diskcg;
return 0;
}
}
@@ -194,8 +196,9 @@ read_cg (int cg, struct cg **cgpp)
void
release_cgp (struct cg *cgp)
{
+ int cgx = cgp->cg_cgx;
swab_cg (cgp);
- bcopy (cgp, cg_locate (cg), sblock->fs_cgsize);
+ bcopy (cgp, cg_locate (cgx), sblock->fs_cgsize);
free (cgp);
}