Index: rtprio.c
===================================================================
--- rtprio.c    (revision 216884)
+++ rtprio.c    (working copy)
@@ -41,6 +41,7 @@

 #include <ctype.h>
 #include <err.h>
+#include <libgen.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -57,11 +58,7 @@
        int     proc = 0;
        struct rtprio rtp;

-       /* find basename */
-       if ((p = rindex(argv[0], '/')) == NULL)
-               p = argv[0];
-       else
-               ++p;
+       p = basename(argv[0]);

        if (!strcmp(p, "rtprio"))
                rtp.type = RTP_PRIO_REALTIME;


-- 
Eitan Adler
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to