From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Thu, 13 Dec 2012 10:59:57 +0000 Subject: [Cluster-devel] [PATCH] GFS2: Initialize hex string to '0' In-Reply-To: <20121211220124.GR1396@redhat.com> References: <20121211220124.GR1396@redhat.com> Message-ID: <1355396397.2708.10.camel@menhir> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Thanks for the patch - I'll put it in the tree just as soon as Linus as pulled the current set of patches, Steve. On Tue, 2012-12-11 at 17:01 -0500, Nathan Straz wrote: > When generating the DLM lock name, a value of 0 would skip > the loop and leave the string unchanged. This left locks with > a value of 0 unlabeled. Initializing the string to '0' fixes this. > --- > fs/gfs2/lock_dlm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c > index 0fb6539..a924b6a 100644 > --- a/fs/gfs2/lock_dlm.c > +++ b/fs/gfs2/lock_dlm.c > @@ -239,6 +239,7 @@ static u32 make_flags(struct gfs2_glock *gl, const unsigned int gfs_flags, > > static void gfs2_reverse_hex(char *c, u64 value) > { > + *c = '0'; > while (value) { > *c-- = hex_asc[value & 0x0f]; > value >>= 4;