utils: Fix CID
1638831 Division or modulo by zero
The conditions now == start or pos == start_pos are checked
at the beginning of the function definition to ensure that avg
is non zero.
Also an appropriate print statement is added to indicate
the print status.
Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 16 07:10:57 UTC 2025 on atb-devel-224