*: clean up bool comparison

This commit is contained in:
Gyu-Ho Lee
2016-04-02 18:27:54 -07:00
parent b0cc0e443c
commit c09f23c46d
11 changed files with 39 additions and 40 deletions

View File

@ -133,7 +133,7 @@ func (rc *raftNode) publishEntries(ents []raftpb.Entry) bool {
// openWAL returns a WAL ready for reading.
func (rc *raftNode) openWAL() *wal.WAL {
if wal.Exist(rc.waldir) == false {
if !wal.Exist(rc.waldir) {
if err := os.Mkdir(rc.waldir, 0750); err != nil {
log.Fatalf("raftexample: cannot create dir for wal (%v)", err)
}