]> arthur.barton.de Git - bup.git/commit
Replace atoi with explicit checks; rm unused atof
authorRob Browning <rlb@defaultvalue.org>
Tue, 22 Dec 2020 17:17:45 +0000 (11:17 -0600)
committerRob Browning <rlb@defaultvalue.org>
Thu, 24 Dec 2020 01:27:40 +0000 (19:27 -0600)
commitb8e90ee2882c7b93d6c8c8fb1ef4cc6ed00aa2b3
tree7b76593885b0f5f3a6dd161ae7561ed65a711982
parentd55be20f5d1efdfbc7bac80bcb1a5f4825872f62
Replace atoi with explicit checks; rm unused atof

Replace atoi with explicit checks, making the intention a bit clearer
at each call site, and avoiding trouble we've had in the past with the
default to 0 for any unrecognized input.

This does make us stricter about the values (and the environment),
i.e. BUP_TTY_WIDTH=random-noise will now cause a crash.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/client.py
lib/bup/helpers.py
lib/bup/ssh.py
lib/cmd/bup
lib/cmd/random-cmd.py