qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V5 2/8] snapshot: distinguish id and name in sna


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH V5 2/8] snapshot: distinguish id and name in snapshot delete
Date: Thu, 18 Jul 2013 19:07:04 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jul 11, 2013 at 01:46:58PM +0800, Wenchao Xia wrote:
> diff --git a/include/qemu-common.h b/include/qemu-common.h
> index f439738..06c777f 100644
> --- a/include/qemu-common.h
> +++ b/include/qemu-common.h
> @@ -191,6 +191,9 @@ int64_t strtosz_suffix(const char *nptr, char **end, 
> const char default_suffix);
>  int64_t strtosz_suffix_unit(const char *nptr, char **end,
>                              const char default_suffix, int64_t unit);
>  
> +/* used to print char* safely */
> +#define STR_PRINT_CHAR(str) ((str) ? (str) : "null")

When I saw the name I thought it would filter out non-printable
characters.  Maybe STR_OR_NULL() is a better name?

BTW the evil gcc shortcut is pretty quick to type: str ?: "null".

Besides this I'm pretty happy with this version.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]