[PATCH v3: setxkbmap 4/4] assigned value never used: "next" set at setxkbmap.c(654)
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Feb 12 11:12:53 PST 2011
If we go through the loop, next is overwritten on the very first line.
If we don't go through the loop, next is never referenced again.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
New in this round of review, clearing a simple lint warning.
setxkbmap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/setxkbmap.c b/setxkbmap.c
index ccc2100..0fa7305 100644
--- a/setxkbmap.c
+++ b/setxkbmap.c
@@ -651,7 +651,7 @@ addStringToOptions(char *opt_str, int *sz_opts, int *num_opts, char ***opts)
if ((str = strdup(opt_str)) == NULL)
return False;
- for (tmp = str, next = NULL; (tmp && *tmp != '\0') && ok; tmp = next)
+ for (tmp = str; (tmp && *tmp != '\0') && ok; tmp = next)
{
next = strchr(str, ',');
if (next)
--
1.7.3.2
More information about the xorg-devel
mailing list