[curl/curl] 7ab54e: progress: move transfer speed calc into function

Daniel Stenberg <[email protected]> Sun, 09 May 2021 07:01:43 -0700
Newsgroups gmane.comp.web.curl.cvs
Message-ID <curl/curl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/curl/curl
  Commit: 7ab54e8f413cb8fff8e9dca805e22c83fd632885
      https://github.com/curl/curl/commit/7ab54e8f413cb8fff8e9dca805e22c83fd632885
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-09 (Sun, 09 May 2021)

  Changed paths:
    M lib/progress.c

  Log Message:
  -----------
  progress: move transfer speed calc into function

This silences two scan-build-11 warnings: "The result of the '/'
expression is undefined"

Bug: https://curl.se/mail/lib-2021-05/0022.html
Closes #7035


  Commit: 8a75224a6986a5742215e0e73e1ac0d3419eff43
      https://github.com/curl/curl/commit/8a75224a6986a5742215e0e73e1ac0d3419eff43
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-09 (Sun, 09 May 2021)

  Changed paths:
    M lib/progress.c

  Log Message:
  -----------
  trspeed: use long double for transfer speed calculation


  Commit: 1e19eceb50d6d8b9c9b37e2f8e1259b2f311c82a
      https://github.com/curl/curl/commit/1e19eceb50d6d8b9c9b37e2f8e1259b2f311c82a
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-09 (Sun, 09 May 2021)

  Changed paths:
    M lib/progress.c

  Log Message:
  -----------
  progress/trspeed: use a local convenient pointer to beautify code

The function becomes easier to read and understand with less repetition.


Compare: https://github.com/curl/curl/compare/3f25c01fce88...1e19eceb50d6
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits