r23773: One pstring a day...
authorVolker Lendecke <vlendec@samba.org>
Mon, 9 Jul 2007 16:27:13 +0000 (16:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:55 +0000 (12:23 -0500)
(This used to be commit 0c3016d32b5277b901788b13aa7d3f4b647728f2)

source3/smbd/fileio.c

index 1227d12b08e5333314ebc93f20e6d8e82871b12a..946d57da7e56a42e76b874b112a051d43e05aff0 100644 (file)
@@ -780,9 +780,11 @@ void set_filelen_write_cache(files_struct *fsp, SMB_OFF_T file_size)
        if(fsp->wcp) {
                /* The cache *must* have been flushed before we do this. */
                if (fsp->wcp->data_size != 0) {
-                       pstring msg;
-                       slprintf(msg, sizeof(msg)-1, "set_filelen_write_cache: size change \
-on file %s with write cache size = %lu\n", fsp->fsp_name, (unsigned long)fsp->wcp->data_size );
+                       char *msg;
+                       asprintf(&msg, "set_filelen_write_cache: size change "
+                                "on file %s with write cache size = %lu\n",
+                                fsp->fsp_name,
+                                (unsigned long)fsp->wcp->data_size);
                        smb_panic(msg);
                }
                fsp->wcp->file_size = file_size;