summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-01-15 11:44:19 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-01-15 11:44:19 +0000
commitedf0caecc0d9cf0bd415cae8c0ea8d9d10c70220 (patch)
treef16242f6afa11d7932e7238e0141d7d59421ab58 /usr.bin/tmux
parent0f2f086e82fcfa2ac03a85c65e6773254cc94bea (diff)
Couple of fixes from cppcheck via Tiago Cunha.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/arguments.c5
-rw-r--r--usr.bin/tmux/grid.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c
index 46c012f3450..5d3fa331ce2 100644
--- a/usr.bin/tmux/arguments.c
+++ b/usr.bin/tmux/arguments.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arguments.c,v 1.7 2014/01/09 13:51:57 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.8 2014/01/15 11:44:18 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -78,7 +78,6 @@ struct args *
args_parse(const char *template, int argc, char **argv)
{
struct args *args;
- char *ptr;
int opt;
args = xcalloc(1, sizeof *args);
@@ -89,7 +88,7 @@ args_parse(const char *template, int argc, char **argv)
while ((opt = getopt(argc, argv, template)) != -1) {
if (opt < 0)
continue;
- if (opt == '?' || (ptr = strchr(template, opt)) == NULL) {
+ if (opt == '?' || strchr(template, opt) == NULL) {
args_free(args);
return (NULL);
}
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c
index fd856f4ce27..a1235799017 100644
--- a/usr.bin/tmux/grid.c
+++ b/usr.bin/tmux/grid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid.c,v 1.32 2014/01/09 13:58:06 nicm Exp $ */
+/* $OpenBSD: grid.c,v 1.33 2014/01/15 11:44:18 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -124,7 +124,7 @@ grid_compare(struct grid *ga, struct grid *gb)
struct grid_cell *gca, *gcb;
u_int xx, yy;
- if (ga->sx != gb->sx || ga->sy != ga->sy)
+ if (ga->sx != gb->sx || ga->sy != gb->sy)
return (1);
for (yy = 0; yy < ga->sy; yy++) {