mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-25 16:06:18 +00:00
fix staticcheck SA5011: possible nil pointer dereference
This commit is contained in:
parent
5f66fb5de0
commit
60fedfed83
2 changed files with 5 additions and 2 deletions
|
|
@ -82,7 +82,6 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
|
|||
logger.Info("Starting remote server health-check")
|
||||
|
||||
stat := &serverStat{
|
||||
address: client.address,
|
||||
services: make(map[string]map[string]string),
|
||||
}
|
||||
if client == nil {
|
||||
|
|
@ -94,6 +93,8 @@ func (w *wizard) gatherStats(server string, pubkey []byte, client *sshClient) *s
|
|||
}
|
||||
client = conn
|
||||
}
|
||||
stat.address = client.address
|
||||
|
||||
// Client connected one way or another, run health-checks
|
||||
logger.Debug("Checking for nginx availability")
|
||||
if infos, err := checkNginx(client, w.network); err != nil {
|
||||
|
|
|
|||
|
|
@ -64,11 +64,13 @@ func (msg *CallMsg) SetGas(gas int64) { msg.msg.Gas = uint64(gas) }
|
|||
func (msg *CallMsg) SetGasPrice(price *BigInt) { msg.msg.GasPrice = price.bigint }
|
||||
func (msg *CallMsg) SetValue(value *BigInt) { msg.msg.Value = value.bigint }
|
||||
func (msg *CallMsg) SetData(data []byte) { msg.msg.Data = common.CopyBytes(data) }
|
||||
|
||||
func (msg *CallMsg) SetTo(address *Address) {
|
||||
if address == nil {
|
||||
msg.msg.To = nil
|
||||
} else {
|
||||
msg.msg.To = &address.address
|
||||
}
|
||||
msg.msg.To = &address.address
|
||||
}
|
||||
|
||||
// SyncProgress gives progress indications when the node is synchronising with
|
||||
|
|
|
|||
Loading…
Reference in a new issue