mirror of
https://github.com/tmux/tmux.git
synced 2025-04-14 07:18:49 +00:00
Couple of fixes from cppcheck via Tiago Cunha.
This commit is contained in:
parent
b185449d07
commit
3368b602a8
@ -78,7 +78,6 @@ struct args *
|
|||||||
args_parse(const char *template, int argc, char **argv)
|
args_parse(const char *template, int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct args *args;
|
struct args *args;
|
||||||
char *ptr;
|
|
||||||
int opt;
|
int opt;
|
||||||
|
|
||||||
args = xcalloc(1, sizeof *args);
|
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) {
|
while ((opt = getopt(argc, argv, template)) != -1) {
|
||||||
if (opt < 0)
|
if (opt < 0)
|
||||||
continue;
|
continue;
|
||||||
if (opt == '?' || (ptr = strchr(template, opt)) == NULL) {
|
if (opt == '?' || strchr(template, opt) == NULL) {
|
||||||
args_free(args);
|
args_free(args);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
2
grid.c
2
grid.c
@ -124,7 +124,7 @@ grid_compare(struct grid *ga, struct grid *gb)
|
|||||||
struct grid_cell *gca, *gcb;
|
struct grid_cell *gca, *gcb;
|
||||||
u_int xx, yy;
|
u_int xx, yy;
|
||||||
|
|
||||||
if (ga->sx != gb->sx || ga->sy != ga->sy)
|
if (ga->sx != gb->sx || ga->sy != gb->sy)
|
||||||
return (1);
|
return (1);
|
||||||
|
|
||||||
for (yy = 0; yy < ga->sy; yy++) {
|
for (yy = 0; yy < ga->sy; yy++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user