Skip to content

Commit 02064fd

Browse files
committed
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>
1 parent 2cf8f13 commit 02064fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

criu/tty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int pts_fd_get_index(int fd, const struct fd_parms *p)
259259
{
260260
int index;
261261
const struct fd_link *link = p->link;
262-
char *pos = strrchr(link->name, '/');
262+
const char *pos = strrchr(link->name, '/');
263263

264264
if (!pos || pos == (link->name + link->len - 1)) {
265265
pr_err("Unexpected format on path %s\n", link->name + 1);

0 commit comments

Comments
 (0)