diff options
author | Ron Yorston <rmy@pobox.com> | 2015-10-31 17:13:47 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2015-10-31 17:13:47 +0000 |
commit | 4432dbba6559d3d88e18ecf2c33d9e5a39e82074 (patch) | |
tree | f6db886523a04e0b45926336223ff8c32761dc43 /libbb/kernel_version.c | |
parent | bc09f29f78547856e2152dc47051aeed548f28e8 (diff) | |
parent | 6bd3fff51aa74e2ee2d87887b12182a3b09792ef (diff) | |
download | busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.gz busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.tar.bz2 busybox-w32-4432dbba6559d3d88e18ecf2c33d9e5a39e82074.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/kernel_version.c')
-rw-r--r-- | libbb/kernel_version.c | 8 |
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 @@ | |||
20 | int FAST_FUNC get_linux_version_code(void) | 20 | int FAST_FUNC get_linux_version_code(void) |
21 | { | 21 | { |
22 | struct utsname name; | 22 | struct utsname name; |
23 | char *s, *t; | 23 | char *t; |
24 | int i, r; | 24 | int i, r; |
25 | 25 | ||
26 | uname(&name); /* never fails */ | 26 | uname(&name); /* never fails */ |
27 | s = name.release; | 27 | t = name.release; |
28 | r = 0; | 28 | r = 0; |
29 | for (i = 0; i < 3; i++) { | 29 | for (i = 0; i < 3; i++) { |
30 | t = strtok(s, "."); | 30 | t = strtok(t, "."); |
31 | r = r * 256 + (t ? atoi(t) : 0); | 31 | r = r * 256 + (t ? atoi(t) : 0); |
32 | s = NULL; | 32 | t = NULL; |
33 | } | 33 | } |
34 | return r; | 34 | return r; |
35 | } | 35 | } |