History

sync with Plan 9

Russ Cox committed 20 years ago

Commit a85fefc1 parent bf7b4c41 file · +2 −3Browse files

Unified · Split

kern/devmnt.c+2−3
@@ -196,7 +196,8 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 195 unmodified lines
196196 error("server tries to increase msize in fversion");
197197 if(f.msize<256 || f.msize>1024*1024)
198198 error("nonsense value of msize in fversion");
199− if(strncmp(f.version, v, strlen(f.version)) != 0)
199+ k = strlen(f.version);
200+ if(strncmp(f.version, v, k) != 0)
200201 error("bad 9P version returned from server");
201202
202203 /* now build Mnt associated with this connection */
@@ -220,7 +221,6 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 17 unmodified lines
220221 m->msize = f.msize;
221222 unlock(&mntalloc.lk);
222223
223− k = strlen(f.version);
224224 if(returnlen > 0){
225225 if(returnlen < k)
226226 error(Eshort);
@@ -242,7 +242,6 @@ mntversion(Chan *c, char *version, int msize, int returnlen) · 15 unmodified lines
242242 poperror(); /* c */
243243 qunlock(&c->umqlock);
244244
245− free(msg);
246245 return k;
247246 }
248247

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t