modpost: explain why we can't use strsep
authorWolfram Sang <wsa@kernel.org>
Sun, 26 Jul 2020 21:44:19 +0000 (23:44 +0200)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 27 Jul 2020 04:38:38 +0000 (13:38 +0900)
Mention why we open-code strsep, so it is clear that it is intentional.

Fixes: 736bb11898ef ("modpost: remove use of non-standard strsep() in HOSTCC code")
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/modpost.c

index 45f2ab2..69341b3 100644 (file)
@@ -144,6 +144,7 @@ char *get_line(char **stringp)
        if (!orig || *orig == '\0')
                return NULL;
 
+       /* don't use strsep here, it is not available everywhere */
        next = strchr(orig, '\n');
        if (next)
                *next++ = '\0';