summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2003-05-01 01:32:08 +0000
committergrog <grog@FreeBSD.org>2003-05-01 01:32:08 +0000
commit0d67c021fc19c58f90b07932cf399751f0422484 (patch)
tree0f0357d286eb9e4233bf9989a3174778e52e73a7 /sys
parent6d8afb2f55a4abc7cadd02acf000603e11c50ee2 (diff)
downloadFreeBSD-src-0d67c021fc19c58f90b07932cf399751f0422484.zip
FreeBSD-src-0d67c021fc19c58f90b07932cf399751f0422484.tar.gz
Use strrchr, not rindex. This is for compatibility with other
systems, and requires a #define.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/vinum/vinummemory.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c
index 6936e48..f83d696 100644
--- a/sys/dev/vinum/vinummemory.c
+++ b/sys/dev/vinum/vinummemory.c
@@ -33,20 +33,20 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinummemory.c,v 1.28 2001/05/23 23:04:06 grog Exp grog $
+ * $Id: vinummemory.c,v 1.30 2003/04/28 02:54:43 grog Exp $
* $FreeBSD$
*/
#include <dev/vinum/vinumhdr.h>
#ifdef VINUMDEBUG
-#undef longjmp /* this was defined as LongJmp */
-
#include <dev/vinum/request.h>
extern struct rqinfo rqinfo[];
extern struct rqinfo *rqip;
int rqinfo_size = RQINFO_SIZE; /* for debugger */
+#undef longjmp /* this was defined as LongJmp */
+#define strrchr rindex
#ifdef __i386__ /* check for validity */
void
LongJmp(jmp_buf buf, int retval)
@@ -87,16 +87,16 @@ LongJmp(jmp_buf buf, int retval)
longjmp(buf, retval);
}
-#else
+#else /* not i386 */
#define LongJmp longjmp /* just use the kernel function */
-#endif
-#endif
+#endif /* i386 */
+#endif /* VINUMDEBUG */
/* find the base name of a path name */
char *
basename(char *file)
{
- char *f = rindex(file, '/'); /* chop off dirname if present */
+ char *f = strrchr(file, '/'); /* chop off dirname if present */
if (f == NULL)
return file;
@@ -196,7 +196,7 @@ FFree(void *mem, char *file, int line)
malloccount--;
total_malloced -= malloced[i].size;
if (debug & DEBUG_MEMFREE) { /* keep track of recent frees */
- char *f = rindex(file, '/'); /* chop off dirname if present */
+ char *f = strrchr(file, '/'); /* chop off dirname if present */
if (f == NULL)
f = file;
OpenPOWER on IntegriCloud