qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

9pfs: drop useless v9fs_string_null() function

The v9fs_string_null() function just calls v9fs_string_free(). Also it
only has 4 users, whereas v9fs_string_free() has 87.

This patch converts users to call directly v9fs_string_free() and drops
the useless function.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>

+4 -10
-5
fsdev/9p-marshal.c
··· 25 25 str->size = 0; 26 26 } 27 27 28 - void v9fs_string_null(V9fsString *str) 29 - { 30 - v9fs_string_free(str); 31 - } 32 - 33 28 void GCC_FMT_ATTR(2, 3) 34 29 v9fs_string_sprintf(V9fsString *str, const char *fmt, ...) 35 30 {
-1
fsdev/9p-marshal.h
··· 77 77 str->size = 0; 78 78 } 79 79 extern void v9fs_string_free(V9fsString *str); 80 - extern void v9fs_string_null(V9fsString *str); 81 80 extern void v9fs_string_sprintf(V9fsString *str, const char *fmt, ...); 82 81 extern void v9fs_string_copy(V9fsString *lhs, V9fsString *rhs); 83 82
+4 -4
hw/9pfs/9p.c
··· 810 810 v9stat->mtime = stbuf->st_mtime; 811 811 v9stat->length = stbuf->st_size; 812 812 813 - v9fs_string_null(&v9stat->uid); 814 - v9fs_string_null(&v9stat->gid); 815 - v9fs_string_null(&v9stat->muid); 813 + v9fs_string_free(&v9stat->uid); 814 + v9fs_string_free(&v9stat->gid); 815 + v9fs_string_free(&v9stat->muid); 816 816 817 817 v9stat->n_uid = stbuf->st_uid; 818 818 v9stat->n_gid = stbuf->st_gid; 819 819 v9stat->n_muid = 0; 820 820 821 - v9fs_string_null(&v9stat->extension); 821 + v9fs_string_free(&v9stat->extension); 822 822 823 823 if (v9stat->mode & P9_STAT_MODE_SYMLINK) { 824 824 err = v9fs_co_readlink(pdu, name, &v9stat->extension);