--- a/src/client.c
+++ b/src/client.c
@@ -66,7 +66,7 @@
   console_output_init ();
 
   /* server filename */
-  snprintf (filename, 1024, SOCKET_FILENAME, getenv ("HOME")); 
+  snprintf (filename, sizeof (filename), SOCKET_FILENAME, getenv ("HOME")); 
 
   g_print (_("Connecting to %s...\n"), filename);