diff --git a/tools/zmqsend.c b/tools/zmqsend.c
index d47bf216b4..6148bd623c 100644
--- a/tools/zmqsend.c
+++ b/tools/zmqsend.c
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
 {
     AVBPrint src;
     char c, *src_buf, *recv_buf;
-    int recv_buf_size, ret;
+    int recv_buf_size, ret = 0;
     void *zmq_ctx, *socket;
     const char *bind_address = "tcp://localhost:5555";
     const char *infilename = NULL;