aboutsummaryrefslogtreecommitdiff
path: root/libbb/kernel_version.c
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2015-10-23 18:43:16 +0200
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2015-10-23 18:43:16 +0200
commit00da72bee09cfe4a757cbba4465a76269dae9f43 (patch)
treed30eb748bff17b068232e6c47dbf0560d253a35f /libbb/kernel_version.c
parent59f8475924760a5d74e18a88f325493e7c38c537 (diff)
downloadbusybox-00da72bee09cfe4a757cbba4465a76269dae9f43.tar.gz
busybox-00da72bee09cfe4a757cbba4465a76269dae9f43.tar.bz2
tidy up strtok use
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/kernel_version.c')
-rw-r--r--libbb/kernel_version.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/kernel_version.c b/libbb/kernel_version.c
index 738ed022b..9b6c62299 100644
--- a/libbb/kernel_version.c
+++ b/libbb/kernel_version.c
@@ -20,16 +20,16 @@
int FAST_FUNC get_linux_version_code(void)
{
struct utsname name;
- char *s, *t;
+ char *t;
int i, r;
uname(&name); /* never fails */
- s = name.release;
+ t = name.release;
r = 0;
for (i = 0; i < 3; i++) {
- t = strtok(s, ".");
+ t = strtok(t, ".");
r = r * 256 + (t ? atoi(t) : 0);
- s = NULL;
+ t = NULL;
}
return r;
}