diff options
author | Russ Cox <rsc@swtch.com> | 2008-05-10 13:35:19 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2008-05-10 13:35:19 -0400 |
commit | ada24b4005504a9cc8035987cf5175940ae568a7 (patch) | |
tree | 51def5fcbc79322c17ff8eb56c3734dc5a5d7060 /src/cmd/tapefs | |
parent | 77809fb0cc7c9ff07f0ecd319240c8e3ee2c9528 (diff) | |
download | plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.tar.gz plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.tar.bz2 plan9port-ada24b4005504a9cc8035987cf5175940ae568a7.zip |
misc: array bounds fixes that gcc finds (John Gosset)
Diffstat (limited to 'src/cmd/tapefs')
-rw-r--r-- | src/cmd/tapefs/32vfs.c | 2 | ||||
-rw-r--r-- | src/cmd/tapefs/v10fs.c | 2 | ||||
-rw-r--r-- | src/cmd/tapefs/v6fs.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/tapefs/32vfs.c b/src/cmd/tapefs/32vfs.c index adccd590..1d917f82 100644 --- a/src/cmd/tapefs/32vfs.c +++ b/src/cmd/tapefs/32vfs.c @@ -93,7 +93,7 @@ popdir(Ram *r) continue; f = iget(ino); strncpy(name, dp->name, VNAMELEN); - name[VNAMELEN+1] = '\0'; + name[VNAMELEN] = '\0'; f.name = name; popfile(r, f); } diff --git a/src/cmd/tapefs/v10fs.c b/src/cmd/tapefs/v10fs.c index a2f546cd..c2875b84 100644 --- a/src/cmd/tapefs/v10fs.c +++ b/src/cmd/tapefs/v10fs.c @@ -84,7 +84,7 @@ popdir(Ram *r) continue; f = iget(ino); strncpy(name, dp->name, VNAMELEN); - name[VNAMELEN+1] = '\0'; + name[VNAMELEN] = '\0'; f.name = name; popfile(r, f); } diff --git a/src/cmd/tapefs/v6fs.c b/src/cmd/tapefs/v6fs.c index 648c2128..74c6737c 100644 --- a/src/cmd/tapefs/v6fs.c +++ b/src/cmd/tapefs/v6fs.c @@ -85,7 +85,7 @@ popdir(Ram *r) continue; f = iget(ino); strncpy(name, dp->name, V6NAMELEN); - name[V6NAMELEN+1] = '\0'; + name[V6NAMELEN] = '\0'; f.name = name; popfile(r, f); } |