all: Fix comment typos

Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4481
This commit is contained in:
HairyFotr 2017-11-04 07:20:11 +00:00 committed by Jakob Borg
parent 9245d22f16
commit 7cbd92e1b1
14 changed files with 17 additions and 17 deletions

View File

@ -92,7 +92,7 @@ loop:
return t1.Sub(t0) return t1.Sub(t0)
} }
// report stops the given process and reports on it's resource usage in two // report stops the given process and reports on its resource usage in two
// ways: human readable to stderr, and CSV to stdout. // ways: human readable to stderr, and CSV to stdout.
func report(p *rc.Process, wallTime time.Duration) { func report(p *rc.Process, wallTime time.Duration) {
sv, err := p.SystemVersion() sv, err := p.SystemVersion()

View File

@ -189,7 +189,7 @@ done:
// We can end up here in 3 cases: // We can end up here in 3 cases:
// 1. Timeout joining, in which case there are potentially entries in pendingSessions // 1. Timeout joining, in which case there are potentially entries in pendingSessions
// 2. General session end/timeout, in which case there are entries in activeSessions // 2. General session end/timeout, in which case there are entries in activeSessions
// 3. Protocol handler calls dropSession as one of it's clients disconnects. // 3. Protocol handler calls dropSession as one of its clients disconnects.
sessionMut.Lock() sessionMut.Lock()
delete(pendingSessions, string(s.serverkey)) delete(pendingSessions, string(s.serverkey))

View File

@ -227,7 +227,7 @@ next:
} }
// If we have a relay connection, and the new incoming connection is // If we have a relay connection, and the new incoming connection is
// not a relay connection, we should drop that, and prefer the this one. // not a relay connection, we should drop that, and prefer this one.
connected := s.model.ConnectedTo(remoteID) connected := s.model.ConnectedTo(remoteID)
s.curConMut.Lock() s.curConMut.Lock()
ct, ok := s.currentConnection[remoteID] ct, ok := s.currentConnection[remoteID]

View File

@ -180,9 +180,9 @@ func (m *cachingMux) Cache() map[protocol.DeviceID]CacheEntry {
} }
} }
// Then ask the finder itself for it's cache and do the same. If this // Then ask the finder itself for its cache and do the same. If this
// finder is a global discovery client, it will have no cache. If it's // finder is a global discovery client, it will have no cache. If it's
// a local discovery client, this will be it's current state. // a local discovery client, this will be its current state.
for k, v := range m.finders[i].Cache() { for k, v := range m.finders[i].Cache() {
if v.found { if v.found {
cur := res[k] cur := res[k]

View File

@ -34,7 +34,7 @@ func TestCacheUnique(t *testing.T) {
c.(*cachingMux).ServeBackground() c.(*cachingMux).ServeBackground()
defer c.Stop() defer c.Stop()
// Add a fake discovery service and verify we get it's answers through the // Add a fake discovery service and verify we get its answers through the
// cache. // cache.
f1 := &fakeDiscovery{addresses0} f1 := &fakeDiscovery{addresses0}

View File

@ -1108,7 +1108,7 @@ func (m *Model) handleDeintroductions(introducerCfg config.DeviceConfiguration,
if !foldersDevices.has(folderCfg.Devices[i].DeviceID, folderCfg.ID) { if !foldersDevices.has(folderCfg.Devices[i].DeviceID, folderCfg.ID) {
// We could not find that folder shared on the // We could not find that folder shared on the
// introducer with the device that was introduced to us. // introducer with the device that was introduced to us.
// We should follow and unshare aswell. // We should follow and unshare as well.
l.Infof("Unsharing folder %s with %v as introducer %v no longer shares the folder with that device", folderCfg.Description(), folderCfg.Devices[i].DeviceID, folderCfg.Devices[i].IntroducedBy) l.Infof("Unsharing folder %s with %v as introducer %v no longer shares the folder with that device", folderCfg.Description(), folderCfg.Devices[i].DeviceID, folderCfg.Devices[i].IntroducedBy)
folderCfg.Devices = append(folderCfg.Devices[:i], folderCfg.Devices[i+1:]...) folderCfg.Devices = append(folderCfg.Devices[:i], folderCfg.Devices[i+1:]...)
i-- i--

View File

@ -1908,7 +1908,7 @@ func TestIssue3164(t *testing.T) {
func TestIssue4357(t *testing.T) { func TestIssue4357(t *testing.T) {
db := db.OpenMemory() db := db.OpenMemory()
cfg := defaultConfig.RawCopy() cfg := defaultConfig.RawCopy()
// Create a separate wrapper not to polute other tests. // Create a separate wrapper not to pollute other tests.
wrapper := config.Wrap("/tmp/test", config.Configuration{}) wrapper := config.Wrap("/tmp/test", config.Configuration{})
m := NewModel(wrapper, protocol.LocalDeviceID, "syncthing", "dev", db, nil) m := NewModel(wrapper, protocol.LocalDeviceID, "syncthing", "dev", db, nil)
m.ServeBackground() m.ServeBackground()

View File

@ -386,7 +386,7 @@ func TestWeakHash(t *testing.T) {
} }
} }
// Test that updating a file removes it's old blocks from the blockmap // Test that updating a file removes its old blocks from the blockmap
func TestCopierCleanup(t *testing.T) { func TestCopierCleanup(t *testing.T) {
iterFn := func(folder, file string, index int32) bool { iterFn := func(folder, file string, index int32) bool {
return true return true

View File

@ -146,7 +146,7 @@ func (s *sharedPullerState) tempFile() (io.WriterAt, error) {
} else if !s.ignorePerms { } else if !s.ignorePerms {
// With sufficiently bad luck when exiting or crashing, we may have // With sufficiently bad luck when exiting or crashing, we may have
// had time to chmod the temp file to read only state but not yet // had time to chmod the temp file to read only state but not yet
// moved it to it's final name. This leaves us with a read only temp // moved it to its final name. This leaves us with a read only temp
// file that we're going to try to reuse. To handle that, we need to // file that we're going to try to reuse. To handle that, we need to
// make sure we have write permissions on the file before opening it. // make sure we have write permissions on the file before opening it.
// //

View File

@ -21,7 +21,7 @@ var (
// An AtomicWriter is an *os.File that writes to a temporary file in the same // An AtomicWriter is an *os.File that writes to a temporary file in the same
// directory as the final path. On successful Close the file is renamed to // directory as the final path. On successful Close the file is renamed to
// it's final path. Any error on Write or during Close is accumulated and // its final path. Any error on Write or during Close is accumulated and
// returned on Close, so a lazy user can ignore errors until Close. // returned on Close, so a lazy user can ignore errors until Close.
type AtomicWriter struct { type AtomicWriter struct {
path string path string

View File

@ -35,9 +35,9 @@ func TryRename(filesystem fs.Filesystem, from, to string) error {
}) })
} }
// Rename moves a temporary file to it's final place. // Rename moves a temporary file to its final place.
// Will make sure to delete the from file if the operation fails, so use only // Will make sure to delete the from file if the operation fails, so use only
// for situations like committing a temp file to it's final location. // for situations like committing a temp file to its final location.
// Tries hard to succeed on various systems by temporarily tweaking directory // Tries hard to succeed on various systems by temporarily tweaking directory
// permissions and removing the destination file when necessary. // permissions and removing the destination file when necessary.
func Rename(filesystem fs.Filesystem, from, to string) error { func Rename(filesystem fs.Filesystem, from, to string) error {
@ -114,7 +114,7 @@ func withPreparedTarget(filesystem fs.Filesystem, from, to string, f func() erro
// copyFileContents copies the contents of the file named src to the file named // copyFileContents copies the contents of the file named src to the file named
// by dst. The file will be created if it does not already exist. If the // by dst. The file will be created if it does not already exist. If the
// destination file exists, all it's contents will be replaced by the contents // destination file exists, all its contents will be replaced by the contents
// of the source file. // of the source file.
func copyFileContents(filesystem fs.Filesystem, src, dst string) (err error) { func copyFileContents(filesystem fs.Filesystem, src, dst string) (err error) {
in, err := filesystem.Open(src) in, err := filesystem.Open(src)

View File

@ -127,7 +127,7 @@ type message interface {
type asyncMessage struct { type asyncMessage struct {
msg message msg message
done chan struct{} // done closes when we're done marshalling the message and it's contents can be reused done chan struct{} // done closes when we're done marshalling the message and its contents can be reused
} }
const ( const (

View File

@ -348,7 +348,7 @@ func TestConflictsIndexReset(t *testing.T) {
log.Println("Updating...") log.Println("Updating...")
// change s2/file2 a few times, so that it's version counter increases. // change s2/file2 a few times, so that its version counter increases.
// This will make the file on the cluster look newer than what we have // This will make the file on the cluster look newer than what we have
// locally after we rest the index, unless we have a fix for that. // locally after we rest the index, unless we have a fix for that.

View File

@ -258,7 +258,7 @@ func testSyncCluster(t *testing.T) {
break break
} }
// Alter the "test-appendfile" without changing it's modification time. Sneaky! // Alter the "test-appendfile" without changing its modification time. Sneaky!
fi, err := os.Stat("s1/test-appendfile") fi, err := os.Stat("s1/test-appendfile")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)