]> git.proxmox.com Git - mirror_frr.git/commit - watchfrr/watchfrr.c
watchfrr: fix SA warning
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 26 Jan 2021 16:58:34 +0000 (13:58 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 26 Jan 2021 17:13:07 +0000 (14:13 -0300)
commit53a78fc1d9b900ae43333f755c9617a618989ae6
treef0f8b290154cb601ead74dcf55581bf66e83a0d3
parentb12bc77cd372f01a5cba52657dff7132bc5f9705
watchfrr: fix SA warning

`valid_command` now causes static analyzer complaints since it no
longer assumes `optarg` is non-NULL. If this was the case then
`valid_command` would return `false` (or 0) because it would mean the
string is empty and doesn't contain the '%s' it expects.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
watchfrr/watchfrr.c