summaryrefslogtreecommitdiff
path: root/ufs
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
commit006c9fc994ee55ed37e2999b1049061f9e1e88c3 (patch)
tree3d2919b56c16b21e52b3ae70a5cf40bedf4e52c2 /ufs
parentb3e99a5ce4d8db6c0d9411529c350b811b64be0b (diff)
Include <string.h>.
Fixup.
Diffstat (limited to 'ufs')
-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);
}