mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Avoid some unnecessary casts and mark some not changing variables const
This commit is contained in:

committed by
cgzones

parent
27870bd4de
commit
ac2b07eddd
2
Panel.c
2
Panel.c
@ -423,7 +423,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
|
||||
for (int try = 0; try < 2; try++) {
|
||||
len = strlen(buffer);
|
||||
for (int i = 0; i < size; i++) {
|
||||
char* cur = ((ListItem*) Panel_get(this, i))->value;
|
||||
const char* cur = ((ListItem*) Panel_get(this, i))->value;
|
||||
while (*cur == ' ') cur++;
|
||||
if (strncasecmp(cur, buffer, len) == 0) {
|
||||
Panel_setSelected(this, i);
|
||||
|
Reference in New Issue
Block a user