Do not use strlen to check that a string is empty

Here, the exact size of a not empty string is useless.
This commit is contained in:
Romain 2015-03-15 15:00:22 +01:00
parent d74f1cc256
commit c1c1189367

View File

@ -15,7 +15,7 @@ index 137446f..bb8391a 100644
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if ((rpath) && (strlen (rpath) == 0))
+ if ((rpath) && (*rpath == '\0'))
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)