[libvirt] [PATCH] esx: remove dead store

Detected by clang. * src/esx/esx_util.c (esxUtil_ParseDatastorePath): No need to increment. --- src/esx/esx_util.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 9ef947c..640e984 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -2,7 +2,7 @@ /* * esx_util.c: utility functions for the VMware ESX driver * - * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2010-2011 Red Hat, Inc. * Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com> * Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org> * @@ -332,7 +332,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName, preliminaryFileName = strrchr(preliminaryDirectoryAndFileName, '/'); if (preliminaryFileName != NULL) { - *preliminaryFileName++ = '\0'; + *preliminaryFileName = '\0'; } if (esxVI_String_DeepCopyValue(directoryName, -- 1.7.4.4

On 05/03/2011 06:17 PM, Eric Blake wrote:
Detected by clang.
* src/esx/esx_util.c (esxUtil_ParseDatastorePath): No need to increment. --- src/esx/esx_util.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 9ef947c..640e984 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -2,7 +2,7 @@ /* * esx_util.c: utility functions for the VMware ESX driver * - * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2010-2011 Red Hat, Inc. * Copyright (C) 2009 Matthias Bolte<matthias.bolte@googlemail.com> * Copyright (C) 2009 Maximilian Wilhelm<max@rfc2324.org> * @@ -332,7 +332,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName, preliminaryFileName = strrchr(preliminaryDirectoryAndFileName, '/');
if (preliminaryFileName != NULL) { - *preliminaryFileName++ = '\0'; + *preliminaryFileName = '\0'; }
if (esxVI_String_DeepCopyValue(directoryName,
ACK.

2011/5/4 Eric Blake <eblake@redhat.com>:
Detected by clang.
* src/esx/esx_util.c (esxUtil_ParseDatastorePath): No need to increment. --- src/esx/esx_util.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 9ef947c..640e984 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -2,7 +2,7 @@ /* * esx_util.c: utility functions for the VMware ESX driver * - * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2010-2011 Red Hat, Inc. * Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com> * Copyright (C) 2009 Maximilian Wilhelm <max@rfc2324.org> * @@ -332,7 +332,7 @@ esxUtil_ParseDatastorePath(const char *datastorePath, char **datastoreName, preliminaryFileName = strrchr(preliminaryDirectoryAndFileName, '/');
if (preliminaryFileName != NULL) { - *preliminaryFileName++ = '\0'; + *preliminaryFileName = '\0'; }
if (esxVI_String_DeepCopyValue(directoryName, -- 1.7.4.4
This fixes the problem, but I prefer the attached patch. Matthias

On 05/04/2011 01:16 AM, Matthias Bolte wrote:
This fixes the problem, but I prefer the attached patch.
As do I. ACK to your version. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Laine Stump
-
Matthias Bolte