summaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-27 11:49:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-27 11:49:37 +0200
commit65a9bde6ed484880987a6d88de6e372eca52059f (patch)
treea192e1a8a54d334f457413f9c16041ffdf11533d /scripts/mod
parent860e73b49cd933c708e3e1e1e07cdea81b6acd1c (diff)
parent92ed301919932f777713b9172e525674157e983d (diff)
Merge 5.8-rc7 into char-misc-next
This should resolve the merge/build issues reported when trying to create linux-next. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6aea65c65745..45f2ab2ec2d4 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -138,11 +138,19 @@ char *read_text_file(const char *filename)
char *get_line(char **stringp)
{
+ char *orig = *stringp, *next;
+
/* do not return the unwanted extra line at EOF */
- if (*stringp && **stringp == '\0')
+ if (!orig || *orig == '\0')
return NULL;
- return strsep(stringp, "\n");
+ next = strchr(orig, '\n');
+ if (next)
+ *next++ = '\0';
+
+ *stringp = next;
+
+ return orig;
}
/* A list of all modules we processed */