tftp: on download, open local file only when first bit of data arrived
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 13 Feb 2020 14:27:23 +0000 (15:27 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 13 Feb 2020 14:27:23 +0000 (15:27 +0100)
commitadc540f0dbcd640b37f39364aa4a1c6857a96a96
tree400e54e15e2320ba443205152146634857b1f1c0
parent0c4e5977dfc32b54e452cd88a9cf14afde29c89d
tftp: on download, open local file only when first bit of data arrived

No reason to potentially clobber existing file before absolutely necessary.

function                                             old     new   delta
tftp_protocol                                       1947    2020     +73
tftp_main                                            393     376     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 73/-17)             Total: 56 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/tftp.c