Raft algorithm in C