diff options
author | bptato <nincsnevem662@gmail.com> | 2025-01-14 18:24:10 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2025-01-14 18:24:10 +0100 |
commit | 1abc51cccbe62a4f0e7e13eeb51cfa3aaa9aa542 (patch) | |
tree | 59686fb57f67ba065f29799769f460e60319e3bb /adapter/protocol | |
parent | ea9d594d196e2e24977f454f1fd5b07dddbf7f87 (diff) | |
download | chawan-1abc51cccbe62a4f0e7e13eeb51cfa3aaa9aa542.tar.gz |
More strict defs
Diffstat (limited to 'adapter/protocol')
-rw-r--r-- | adapter/protocol/man.nim | 6 | ||||
-rw-r--r-- | adapter/protocol/sftp.nim | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/adapter/protocol/man.nim b/adapter/protocol/man.nim index 4b26379c..a8c4ae34 100644 --- a/adapter/protocol/man.nim +++ b/adapter/protocol/man.nim @@ -304,9 +304,9 @@ proc doKeyword(man, keyword, section: string) = quit(1) var line: string if not ofile.readLine(line) or ofile.endOfFile(): - var wstatus: cint - discard wait(addr wstatus) - if not WIFEXITED(wstatus) or WEXITSTATUS(wstatus) != 0: + var wstatus = cint(0) + if wait(addr wstatus) >= 0 and not WIFEXITED(wstatus) or + WEXITSTATUS(wstatus) != 0: stdout.write("Cha-Control: ConnectionError 4 " & efile.readErrorMsg(line)) ofile.close() efile.close() diff --git a/adapter/protocol/sftp.nim b/adapter/protocol/sftp.nim index a9ca5b9a..75d6f4cb 100644 --- a/adapter/protocol/sftp.nim +++ b/adapter/protocol/sftp.nim @@ -84,7 +84,7 @@ proc matchesPattern(s: string; pats: openArray[string]): bool = proc parseSSHConfig(f: File; host: string; pubKey, privKey: var string) = var skipTillNext = false - var line: string + var line = "" while f.readLine(line): var i = line.skipBlanks(0) if i == line.len or line[i] == '#': |