SCCS-vsn: sbin/restore/utilities.c 3.7
SCCS-vsn: sbin/restore/symtab.c 3.8
/* Copyright (c) 1983 Regents of the University of California */
#ifndef lint
/* Copyright (c) 1983 Regents of the University of California */
#ifndef lint
-static char sccsid[] = "@(#)symtab.c 3.7 (Berkeley) 83/03/23";
+static char sccsid[] = "@(#)symtab.c 3.8 (Berkeley) 83/03/27";
{
struct entry *np;
char *cp;
{
struct entry *np;
char *cp;
np = lookupparent(newname);
if (np == NIL)
np = lookupparent(newname);
if (np == NIL)
for (i = ROOTINO; i < maxino; i++) {
for (ep = lookupino(i); ep != NIL; ep = ep->e_links) {
ep->e_index = mynum++;
for (i = ROOTINO; i < maxino; i++) {
for (ep = lookupino(i); ep != NIL; ep = ep->e_links) {
ep->e_index = mynum++;
- fwrite(ep->e_name, sizeof(char),
- allocsize(ep->e_namlen), fd);
+ (void) fwrite(ep->e_name, sizeof(char),
+ (int)allocsize(ep->e_namlen), fd);
stroff = 0;
for (i = ROOTINO; i < maxino; i++) {
for (ep = lookupino(i); ep != NIL; ep = ep->e_links) {
stroff = 0;
for (i = ROOTINO; i < maxino; i++) {
for (ep = lookupino(i); ep != NIL; ep = ep->e_links) {
- bcopy((char *)ep, (char *)tep, sizeof(struct entry));
+ bcopy((char *)ep, (char *)tep,
+ (long)sizeof(struct entry));
tep->e_name = (char *)stroff;
stroff += allocsize(ep->e_namlen);
tep->e_parent = (struct entry *)ep->e_parent->e_index;
tep->e_name = (char *)stroff;
stroff += allocsize(ep->e_namlen);
tep->e_parent = (struct entry *)ep->e_parent->e_index;
if (ep->e_next != NIL)
tep->e_next =
(struct entry *)ep->e_next->e_index;
if (ep->e_next != NIL)
tep->e_next =
(struct entry *)ep->e_next->e_index;
- fwrite((char *)tep, sizeof(struct entry), 1, fd);
+ (void) fwrite((char *)tep, sizeof(struct entry), 1, fd);
tentry = NIL;
else
tentry = (struct entry *)entry[i]->e_index;
tentry = NIL;
else
tentry = (struct entry *)entry[i]->e_index;
- fwrite((char *)&tentry, sizeof(struct entry *), 1, fd);
+ (void) fwrite((char *)&tentry, sizeof(struct entry *), 1, fd);
}
hdr.volno = checkpt;
hdr.maxino = maxino;
}
hdr.volno = checkpt;
hdr.maxino = maxino;
hdr.stringsize = stroff;
hdr.dumptime = dumptime;
hdr.dumpdate = dumpdate;
hdr.stringsize = stroff;
hdr.dumptime = dumptime;
hdr.dumpdate = dumpdate;
- fwrite((char *)&hdr, sizeof(struct symtableheader), 1, fd);
+ (void) fwrite((char *)&hdr, sizeof(struct symtableheader), 1, fd);
if (ferror(fd)) {
perror("fwrite");
panic("output error to file %s writing symbol table\n",
filename);
}
if (ferror(fd)) {
perror("fwrite");
panic("output error to file %s writing symbol table\n",
filename);
}
/* Copyright (c) 1983 Regents of the University of California */
#ifndef lint
/* Copyright (c) 1983 Regents of the University of California */
#ifndef lint
-static char sccsid[] = "@(#)utilities.c 3.6 (Berkeley) 83/03/23";
+static char sccsid[] = "@(#)utilities.c 3.7 (Berkeley) 83/03/27";
#endif
#include "restore.h"
#endif
#include "restore.h"
i++;
if (np == NIL)
badentry(ep, "not on ino list");
i++;
if (np == NIL)
badentry(ep, "not on ino list");
- sprintf(name, "%s%d%d", TMPHDR, i, ep->e_ino);
+ (void) sprintf(name, "%s%d%d", TMPHDR, i, ep->e_ino);