mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
32 lines
930 B
Diff
32 lines
930 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Brendan Coles <bcoles@gmail.com>
|
|
Date: Thu, 23 Dec 2021 10:26:29 +0100
|
|
Subject: [PATCH] Replace a use of rindex() with strrchr()
|
|
|
|
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
|
|
---
|
|
src/dosnames.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/dosnames.c b/src/dosnames.c
|
|
index b6122a9..582a0e2 100644
|
|
--- a/src/dosnames.c
|
|
+++ b/src/dosnames.c
|
|
@@ -9,6 +9,7 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
+#include <strings.h>
|
|
#include <sys/stat.h>
|
|
|
|
// DOS directory entries.
|
|
@@ -589,7 +590,7 @@ char *dos_unix_path_fcb(int addr, int force)
|
|
static struct dos_file_list *find_first_file(char *fspec)
|
|
{
|
|
// Now, separate the path to the spec
|
|
- char *glob, *unixpath, *p = rindex(fspec, '/');
|
|
+ char *glob, *unixpath, *p = strrchr(fspec, '/');
|
|
if(!p)
|
|
{
|
|
glob = fspec;
|