aboutsummaryrefslogtreecommitdiff
path: root/src/libventi
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-08-11 17:33:43 +0000
committerrsc <devnull@localhost>2005-08-11 17:33:43 +0000
commitbcac59d81b63c352a9073104e7e63838e117a877 (patch)
treef8a3ffb635c9d2209d42baf19c85c73eaa2d90db /src/libventi
parent01d1f4cb4b791eca0bc79bc00188bf3c688290e6 (diff)
downloadplan9port-bcac59d81b63c352a9073104e7e63838e117a877.tar.gz
plan9port-bcac59d81b63c352a9073104e7e63838e117a877.tar.bz2
plan9port-bcac59d81b63c352a9073104e7e63838e117a877.zip
silence various warnings
Diffstat (limited to 'src/libventi')
-rw-r--r--src/libventi/version.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libventi/version.c b/src/libventi/version.c
index c985910f..fd1e2389 100644
--- a/src/libventi/version.c
+++ b/src/libventi/version.c
@@ -81,8 +81,12 @@ vtversion(VtConn *z)
vtdebug(z, "version string in: %s", buf);
p = buf+strlen(prefix);
- for(;;){
+ for(; *p; p=pp){
+ if(*p == ':' || *p == '-')
+ p++;
pp = strpbrk(p, ":-");
+ if(pp == nil)
+ pp = p+strlen(p);
for(i=0; okvers[i]; i++)
if(strlen(okvers[i]) == pp-p && memcmp(okvers[i], p, pp-p) == 0){
*pp = 0;