[patch #8301] Use strrchr() instead of rindex()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #8301] Use strrchr() instead of rindex()

Eric L.-2
URL:
  <http://savannah.nongnu.org/patch/?8301>

                 Summary: Use strrchr() instead of rindex()
                 Project: WeeChat
            Submitted by: None
            Submitted on: Sat 01 Feb 2014 02:41:56 PM UTC
                Category: compilation
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: [hidden email]
             Open/Closed: Open
         Discussion Lock: Any
                IRC nick: fornwall

    _______________________________________________________

Details:

Nowadays strrchr() is preferred over rindex() [1].

This fixes compilation with androids bionic libc, which has strrchr() but not
rindex().

  [1]: http://pubs.opengroup.org/onlinepubs/007904975/functions/rindex.html



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 01 Feb 2014 02:41:56 PM UTC  Name: strrchr_insteadof_rindex.patch
Size: 563B   By: None

<http://savannah.nongnu.org/patch/download.php?file_id=30432>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8301>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev
Reply | Threaded
Open this post in threaded view
|

[patch #8301] Use strrchr() instead of rindex()

Eric L.-2
Update of patch #8301 (project weechat):

                  Status:                    None => Done                  
             Assigned to:                    None => flashcode              

    _______________________________________________________

Follow-up Comment #1:

Thanks for the patch, committed.

I replaced another call to rindex() (in rmodifier plugin), and I removed the
include of "strings.h", which should not be needed any more.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8301>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/weechat-dev