Commit 323fbdb
committed
hawkbit-client: add strptime() error check
Check for strptime() parsing failures, issue a warning and return the
default config `retry_wait` value. We should not run into such issues
since the value is hawkBit-controlled, but better be safe than sorry.
While at it, initialize the tm struct, so reading unfilled fields does
not lead to undefined behavior. This is for good measure only since %T
fills all fields currently used.
Signed-off-by: Bastian Krause <bst@pengutronix.de>1 parent 9693c55 commit 323fbdb
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
766 | 766 | | |
767 | 767 | | |
768 | 768 | | |
769 | | - | |
| 769 | + | |
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
792 | 796 | | |
793 | 797 | | |
794 | 798 | | |
| |||
0 commit comments