Tweak NEWS & src_file().

This commit is contained in:
Wayne Davison committed 2020-07-24 23:30:32 -07:00
1 parent 0a255771f4
commit a5a9f268fe
2 files changed
+4 -5

No files matched your search

+2
View File
@@ -70,6 +70,8 @@
- Added some compatibility code for HPE NonStop platforms.
- Improved the INSTALL.md info.
### INTERNAL:
- Use a simpler overflow check idiom in a few spots.
+2 -5
View File
@@ -135,11 +135,8 @@ const char *src_file(const char *file)
static int prefix = -1;
if (prefix < 0) {
const char *cp;
for (cp = util2, prefix = 0; *cp; cp++) {
if (*cp == '/')
prefix = cp - util2 + 1;
}
const char *cp = strrchr(util2, '/');
prefix = cp ? cp - util2 + 1 : 0;
}
if (prefix && strncmp(file, util2, prefix) == 0)