Hello, 2015-08-21 23:26 GMT+02:00 Tito <farmat...@tiscali.it>: > what sense would it make to check if str\0 ends_with \0 if all strings do > end with \0 ?
It can be helpful when key is dynamically created (e.g. extracted from a string) and it comes as an empty string. But it also depends on context: If it is too often checked that (*key == 0) before calling ends_with, it makes sense to embed that check in ends_with. If it doesn't matter, then why make the code (and binary) bigger? Cheers, Xabier Oneca_,,_ _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox