diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-01-07 16:13:14 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-01-07 16:13:14 +0000 |
| commit | 6b404431aa7adea24120894d59daeebc5cbe9727 (patch) | |
| tree | f3ccda749daf6fe9f80f4ee99fbb5d1b0ed4cbb7 | |
| parent | 4e9ca75281a25dcdbb3e2d2fa79108b02afa43db (diff) | |
| download | busybox-w32-6b404431aa7adea24120894d59daeebc5cbe9727.tar.gz busybox-w32-6b404431aa7adea24120894d59daeebc5cbe9727.tar.bz2 busybox-w32-6b404431aa7adea24120894d59daeebc5cbe9727.zip | |
ps: fix build breakage from vda's recent commit
*: whitespace fixes
| -rw-r--r-- | libbb/compare_string_array.c | 10 | ||||
| -rw-r--r-- | libbb/lineedit.c | 2 | ||||
| -rw-r--r-- | libbb/xfuncs.c | 2 | ||||
| -rw-r--r-- | miscutils/hdparm.c | 8 | ||||
| -rw-r--r-- | networking/nameif.c | 2 | ||||
| -rw-r--r-- | networking/ping.c | 4 | ||||
| -rw-r--r-- | networking/wget.c | 2 | ||||
| -rw-r--r-- | procps/pgrep.c | 2 | ||||
| -rw-r--r-- | procps/ps.c | 96 |
9 files changed, 64 insertions, 64 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 7b5ce856d..151b50817 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
| @@ -70,9 +70,9 @@ int index_in_substrings(const char *strings, const char *key) | |||
| 70 | 70 | ||
| 71 | const char *nth_string(const char *strings, int n) | 71 | const char *nth_string(const char *strings, int n) |
| 72 | { | 72 | { |
| 73 | while (n) { | 73 | while (n) { |
| 74 | n--; | 74 | n--; |
| 75 | strings += strlen(strings) + 1; | 75 | strings += strlen(strings) + 1; |
| 76 | } | 76 | } |
| 77 | return strings; | 77 | return strings; |
| 78 | } | 78 | } |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 69768da30..3ccddbcbf 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | enum { | 65 | enum { |
| 66 | /* We use int16_t for positions, need to limit line len */ | 66 | /* We use int16_t for positions, need to limit line len */ |
| 67 | MAX_LINELEN = CONFIG_FEATURE_EDITING_MAX_LEN < 0x7ff0 | 67 | MAX_LINELEN = CONFIG_FEATURE_EDITING_MAX_LEN < 0x7ff0 |
| 68 | ? CONFIG_FEATURE_EDITING_MAX_LEN | 68 | ? CONFIG_FEATURE_EDITING_MAX_LEN |
| 69 | : 0x7ff0 | 69 | : 0x7ff0 |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 6d50bf9bc..25c36bd07 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
| @@ -166,7 +166,7 @@ int ndelay_on(int fd) | |||
| 166 | 166 | ||
| 167 | int close_on_exec_on(int fd) | 167 | int close_on_exec_on(int fd) |
| 168 | { | 168 | { |
| 169 | return fcntl(fd, F_SETFD, FD_CLOEXEC); | 169 | return fcntl(fd, F_SETFD, FD_CLOEXEC); |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | int ndelay_off(int fd) | 172 | int ndelay_off(int fd) |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 03a30e6e9..33bff70e1 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
| @@ -1155,10 +1155,10 @@ static void identify(uint16_t *val) | |||
| 1155 | 1155 | ||
| 1156 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 1156 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
| 1157 | static const char cfg_str[] ALIGN1 = | 1157 | static const char cfg_str[] ALIGN1 = |
| 1158 | """\0" "HardSect""\0" "SoftSect""\0" "NotMFM""\0" | 1158 | """\0" "HardSect""\0" "SoftSect""\0" "NotMFM""\0" |
| 1159 | "HdSw>15uSec""\0" "SpinMotCtl""\0" "Fixed""\0" "Removeable""\0" | 1159 | "HdSw>15uSec""\0" "SpinMotCtl""\0" "Fixed""\0" "Removeable""\0" |
| 1160 | "DTR<=5Mbs""\0" "DTR>5Mbs""\0" "DTR>10Mbs""\0" "RotSpdTol>.5%""\0" | 1160 | "DTR<=5Mbs""\0" "DTR>5Mbs""\0" "DTR>10Mbs""\0" "RotSpdTol>.5%""\0" |
| 1161 | "dStbOff""\0" "TrkOff""\0" "FmtGapReq""\0" "nonMagnetic" | 1161 | "dStbOff""\0" "TrkOff""\0" "FmtGapReq""\0" "nonMagnetic" |
| 1162 | ; | 1162 | ; |
| 1163 | 1163 | ||
| 1164 | static const char BuffType[] ALIGN1 = | 1164 | static const char BuffType[] ALIGN1 = |
diff --git a/networking/nameif.c b/networking/nameif.c index f0b8d11b0..43388ab32 100644 --- a/networking/nameif.c +++ b/networking/nameif.c | |||
| @@ -55,7 +55,7 @@ struct ethtool_drvinfo { | |||
| 55 | char version[32]; /* driver version string */ | 55 | char version[32]; /* driver version string */ |
| 56 | char fw_version[32]; /* firmware version string, if applicable */ | 56 | char fw_version[32]; /* firmware version string, if applicable */ |
| 57 | char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ | 57 | char bus_info[ETHTOOL_BUSINFO_LEN]; /* Bus info for this IF. */ |
| 58 | /* For PCI devices, use pci_dev->slot_name. */ | 58 | /* For PCI devices, use pci_dev->slot_name. */ |
| 59 | char reserved1[32]; | 59 | char reserved1[32]; |
| 60 | char reserved2[16]; | 60 | char reserved2[16]; |
| 61 | uint32_t n_stats; /* number of u64's from ETHTOOL_GSTATS */ | 61 | uint32_t n_stats; /* number of u64's from ETHTOOL_GSTATS */ |
diff --git a/networking/ping.c b/networking/ping.c index 0de1b33f7..0b33abf9a 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
| @@ -277,8 +277,8 @@ struct globals { | |||
| 277 | #define rcvd_tbl (G.rcvd_tbl ) | 277 | #define rcvd_tbl (G.rcvd_tbl ) |
| 278 | void BUG_ping_globals_too_big(void); | 278 | void BUG_ping_globals_too_big(void); |
| 279 | #define INIT_G() do { \ | 279 | #define INIT_G() do { \ |
| 280 | if (sizeof(G) > COMMON_BUFSIZE) \ | 280 | if (sizeof(G) > COMMON_BUFSIZE) \ |
| 281 | BUG_ping_globals_too_big(); \ | 281 | BUG_ping_globals_too_big(); \ |
| 282 | pingsock = -1; \ | 282 | pingsock = -1; \ |
| 283 | tmin = UINT_MAX; \ | 283 | tmin = UINT_MAX; \ |
| 284 | } while (0) | 284 | } while (0) |
diff --git a/networking/wget.c b/networking/wget.c index b12d19af2..1147077e0 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
| @@ -36,7 +36,7 @@ struct globals { | |||
| 36 | }; | 36 | }; |
| 37 | #define G (*(struct globals*)&bb_common_bufsiz1) | 37 | #define G (*(struct globals*)&bb_common_bufsiz1) |
| 38 | struct BUG_G_too_big { | 38 | struct BUG_G_too_big { |
| 39 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; | 39 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; |
| 40 | }; | 40 | }; |
| 41 | #define content_len (G.content_len ) | 41 | #define content_len (G.content_len ) |
| 42 | #define beg_range (G.beg_range ) | 42 | #define beg_range (G.beg_range ) |
diff --git a/procps/pgrep.c b/procps/pgrep.c index f5d4cfcc1..2ebcca1c0 100644 --- a/procps/pgrep.c +++ b/procps/pgrep.c | |||
| @@ -116,7 +116,7 @@ int pgrep_main(int argc, char **argv) | |||
| 116 | cmd = proc->comm; | 116 | cmd = proc->comm; |
| 117 | /* NB: OPT_INVERT is always 0 or 1 */ | 117 | /* NB: OPT_INVERT is always 0 or 1 */ |
| 118 | if ((regexec(&re_buffer, cmd, 1, re_match, 0) == 0 /* match found */ | 118 | if ((regexec(&re_buffer, cmd, 1, re_match, 0) == 0 /* match found */ |
| 119 | && (!OPT_ANCHOR || (re_match[0].rm_so == 0 && re_match[0].rm_eo == strlen(cmd)))) ^ OPT_INVERT | 119 | && (!OPT_ANCHOR || (re_match[0].rm_so == 0 && re_match[0].rm_eo == strlen(cmd)))) ^ OPT_INVERT |
| 120 | ) { | 120 | ) { |
| 121 | matched_pid = proc->pid; | 121 | matched_pid = proc->pid; |
| 122 | if (OPT_LAST) { | 122 | if (OPT_LAST) { |
diff --git a/procps/ps.c b/procps/ps.c index 6a6a9e6d6..a46e92a8b 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
| @@ -66,60 +66,60 @@ struct globals { | |||
| 66 | /* for ELF executables, notes are pushed before environment and args */ | 66 | /* for ELF executables, notes are pushed before environment and args */ |
| 67 | static ptrdiff_t find_elf_note(ptrdiff_t findme) | 67 | static ptrdiff_t find_elf_note(ptrdiff_t findme) |
| 68 | { | 68 | { |
| 69 | ptrdiff_t *ep = (ptrdiff_t *) environ; | 69 | ptrdiff_t *ep = (ptrdiff_t *) environ; |
| 70 | 70 | ||
| 71 | while (*ep++); | 71 | while (*ep++); |
| 72 | while (*ep) { | 72 | while (*ep) { |
| 73 | if (ep[0] == findme) { | 73 | if (ep[0] == findme) { |
| 74 | return ep[1]; | 74 | return ep[1]; |
| 75 | } | 75 | } |
| 76 | ep += 2; | 76 | ep += 2; |
| 77 | } | 77 | } |
| 78 | return -1; | 78 | return -1; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | #if ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS | 81 | #if ENABLE_FEATURE_PS_UNUSUAL_SYSTEMS |
| 82 | static unsigned get_HZ_by_waiting(void) | 82 | static unsigned get_HZ_by_waiting(void) |
| 83 | { | 83 | { |
| 84 | struct timeval tv1, tv2; | 84 | struct timeval tv1, tv2; |
| 85 | unsigned t1, t2, r, hz; | 85 | unsigned t1, t2, r, hz; |
| 86 | unsigned cnt = cnt; /* for compiler */ | 86 | unsigned cnt = cnt; /* for compiler */ |
| 87 | int diff; | 87 | int diff; |
| 88 | 88 | ||
| 89 | r = 0; | 89 | r = 0; |
| 90 | 90 | ||
| 91 | /* Wait for times() to reach new tick */ | 91 | /* Wait for times() to reach new tick */ |
| 92 | t1 = times(NULL); | 92 | t1 = times(NULL); |
| 93 | do { | 93 | do { |
| 94 | t2 = times(NULL); | 94 | t2 = times(NULL); |
| 95 | } while (t2 == t1); | 95 | } while (t2 == t1); |
| 96 | gettimeofday(&tv2, NULL); | 96 | gettimeofday(&tv2, NULL); |
| 97 | 97 | ||
| 98 | do { | 98 | do { |
| 99 | t1 = t2; | 99 | t1 = t2; |
| 100 | tv1.tv_usec = tv2.tv_usec; | 100 | tv1.tv_usec = tv2.tv_usec; |
| 101 | 101 | ||
| 102 | /* Wait exactly one times() tick */ | 102 | /* Wait exactly one times() tick */ |
| 103 | do { | 103 | do { |
| 104 | t2 = times(NULL); | 104 | t2 = times(NULL); |
| 105 | } while (t2 == t1); | 105 | } while (t2 == t1); |
| 106 | gettimeofday(&tv2, NULL); | 106 | gettimeofday(&tv2, NULL); |
| 107 | 107 | ||
| 108 | /* Calculate ticks per sec, rounding up to even */ | 108 | /* Calculate ticks per sec, rounding up to even */ |
| 109 | diff = tv2.tv_usec - tv1.tv_usec; | 109 | diff = tv2.tv_usec - tv1.tv_usec; |
| 110 | if (diff <= 0) diff += 1000000; | 110 | if (diff <= 0) diff += 1000000; |
| 111 | hz = 1000000u / (unsigned)diff; | 111 | hz = 1000000u / (unsigned)diff; |
| 112 | hz = (hz+1) & ~1; | 112 | hz = (hz+1) & ~1; |
| 113 | 113 | ||
| 114 | /* Count how many same hz values we saw */ | 114 | /* Count how many same hz values we saw */ |
| 115 | if (r != hz) { | 115 | if (r != hz) { |
| 116 | r = hz; | 116 | r = hz; |
| 117 | cnt = 0; | 117 | cnt = 0; |
| 118 | } | 118 | } |
| 119 | cnt++; | 119 | cnt++; |
| 120 | } while (cnt < 3); /* exit if saw 3 same values */ | 120 | } while (cnt < 3); /* exit if saw 3 same values */ |
| 121 | 121 | ||
| 122 | return r; | 122 | return r; |
| 123 | } | 123 | } |
| 124 | #else | 124 | #else |
| 125 | static inline unsigned get_HZ_by_waiting(void) | 125 | static inline unsigned get_HZ_by_waiting(void) |
| @@ -190,7 +190,7 @@ static void put_lu(char *buf, int size, unsigned long u) | |||
| 190 | char buf5[5]; | 190 | char buf5[5]; |
| 191 | 191 | ||
| 192 | /* see http://en.wikipedia.org/wiki/Tera */ | 192 | /* see http://en.wikipedia.org/wiki/Tera */ |
| 193 | smart_ulltoa4( (u, buf5, " mgtpezy"); | 193 | smart_ulltoa4(u, buf5, " mgtpezy"); |
| 194 | buf5[5] = '\0'; | 194 | buf5[5] = '\0'; |
| 195 | sprintf(buf, "%.*s", size, buf5); | 195 | sprintf(buf, "%.*s", size, buf5); |
| 196 | } | 196 | } |
