mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-22 18:05:10 +00:00
tty: fix compiler error
At least on tests running on Fedora rawhide following error could be
seen:
```
criu/tty.c: In function 'pts_fd_get_index':
criu/tty.c:262:21: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
262 | char *pos = strrchr(link->name, '/');
|
```
This fixes it.
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
09bb362664
commit
90300748ef
1 changed files with 1 additions and 1 deletions
|
|
@ -259,7 +259,7 @@ static int pts_fd_get_index(int fd, const struct fd_parms *p)
|
|||
{
|
||||
int index;
|
||||
const struct fd_link *link = p->link;
|
||||
char *pos = strrchr(link->name, '/');
|
||||
const char *pos = strrchr(link->name, '/');
|
||||
|
||||
if (!pos || pos == (link->name + link->len - 1)) {
|
||||
pr_err("Unexpected format on path %s\n", link->name + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue