[master] 87a9412aa vsc: Apply usleep.cocci

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Feb 5 16:56:06 UTC 2025


commit 87a9412aa6c2a7e739540f31672e32ef67a477e6
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed Feb 5 17:53:24 2025 +0100

    vsc: Apply usleep.cocci

diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index 668b0b676..2e2f2e4d8 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -402,7 +402,7 @@ vsc_map_seg(const struct vsc *vsc, struct vsm *vsm, struct vsc_seg *sp)
 	 * operations, so there is no reason to allow a long retry
 	 * time. */
 	for (retry = 10; retry > 0 && head->ready == 0; retry--)
-		usleep(10000);
+		VTIM_sleep(0.01);
 
 	if (head->ready == 0) {
 		AZ(VSM_Unmap(vsm, sp->fantom));


More information about the varnish-commit mailing list