Do not use strlen if not necessary... :-)
authorVolker Lendecke <vl@samba.org>
Sun, 1 Feb 2009 19:47:59 +0000 (20:47 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 10 Feb 2009 20:55:13 +0000 (21:55 +0100)
source3/libsmb/cliconnect.c

index a39e035d2acd810877df64cad06b165bb3a28a49..dabfc398ced293703dff0bc0f4fd9d85a616b4cd 100644 (file)
@@ -188,10 +188,8 @@ struct async_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx,
                                   NULL);
        bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), "", 1, /* workgroup */
                                   NULL);
-       bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), "Unix",
-                                  strlen("Unix")+1, NULL);
-       bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), "Samba",
-                                  strlen("Samba")+1, NULL);
+       bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), "Unix", 5, NULL);
+       bytes = smb_bytes_push_str(bytes, cli_ucs2(cli), "Samba", 6, NULL);
 
        if (bytes == NULL) {
                return NULL;