summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>1998-11-09 03:43:55 +0000
committertruckman <truckman@FreeBSD.org>1998-11-09 03:43:55 +0000
commit45b4ed0fe73fd29dc68df3d73b2fee6ab2807725 (patch)
tree63868030d684bd4feae3c2530c72c1467a1f0c6e /sbin
parent85139e6fc1b7d66f1dbb0376939fe268efc196b9 (diff)
downloadFreeBSD-src-45b4ed0fe73fd29dc68df3d73b2fee6ab2807725.zip
FreeBSD-src-45b4ed0fe73fd29dc68df3d73b2fee6ab2807725.tar.gz
Fix some calculations that use sizeof to attempt to find the end of an
array that were doing sizeof on an unrelated variable. This just happened to work right on the i386, but would not on the alpha. PR: bin/8427
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsdb/fsdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 86a02cf..423a160 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id$";
+ "$Id: fsdb.c,v 1.10 1998/06/15 07:12:19 charnier Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -617,7 +617,7 @@ CMDFUNCSTART(newtype)
return 1;
type = curinode->di_mode & IFMT;
for (tp = typenamemap;
- tp < &typenamemap[sizeof(typemap)/sizeof(*typemap)];
+ tp < &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)];
tp++) {
if (!strcmp(argv[1], tp->typename)) {
printf("setting type to %s\n", tp->typename);
@@ -625,7 +625,7 @@ CMDFUNCSTART(newtype)
break;
}
}
- if (tp == &typenamemap[sizeof(typemap)/sizeof(*typemap)]) {
+ if (tp == &typenamemap[sizeof(typenamemap)/sizeof(*typenamemap)]) {
warnx("type `%s' not known", argv[1]);
warnx("try one of `file', `dir', `socket', `fifo'");
return 1;
OpenPOWER on IntegriCloud