From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: [9fans] cifs buglet - take 2
Date: Tue, 5 Feb 2019 11:58:49 +0000 [thread overview]
Message-ID: <0e227efd0c071cfd09fb46ec70dd1d09@quintile.net> (raw)
sorry, I generated the diff on the wrong server, slightly safer fix below
diff /n/dump/2019/0205/sys/src/cmd/cifs/main.c /sys/src/cmd/cifs/main.c
261,265c261,264
< if(got >= 2 && strcmp(fi[0].name, ".") == 0 &&
< strcmp(fi[1].name, "..") == 0){
< a->end = (got - 2) * sizeof(FInfo);
< memmove(a->cache, a->cache + sizeof(FInfo)*2,
< a->end - a->off);
---
> while(got > 0 && strcmp(fi[0].name, ".") == 0 || strcmp(fi[0].name, "..") == 0){
> got--;
> a->end = got * sizeof(FInfo);
> memmove(a->cache, a->cache + sizeof(FInfo), a->end - a->off);
-Steve
next reply other threads:[~2019-02-05 11:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-05 11:58 Steve Simon [this message]
2019-02-05 17:10 cinap_lenrek
2019-02-05 17:26 ` Steve Simon
2019-02-05 17:39 cinap_lenrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0e227efd0c071cfd09fb46ec70dd1d09@quintile.net \
--to=steve@quintile.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).