← Commit list

1bab1de69

Denis Vlasenko
Denis Vlasenko
2007-07-27
FAILED Duration: 13s

Subject

fix for suffix optimization (which was in previous commit)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

include/libbb.h+1 -0
@@ -450,6 +450,7 @@ const char *make_human_readable_str(unsigned long long size,
/* Put a string of hex bytes ("1b2e66fe"...), return advanced pointer */
char *bin2hex(char *buf, const char *cp, int count);
+/* Last element is marked by mult == 0 */
struct suffix_mult {
char suffix[4];
unsigned mult;
libbb/xatonum_template.c+1 -1
@@ -45,7 +45,7 @@ unsigned type xstrtou(_range_sfx)(const char *numstr, int base,
* Note that we also allow nul suffixes with associated multipliers,
* to allow for scaling of the numstr by some default multiplier. */
if (suffixes) {
- while (suffixes->suffix) {
+ while (suffixes->mult) {
if (strcmp(suffixes->suffix, e) == 0) {
if (XSTR_UTYPE_MAX / suffixes->mult < r)
goto range; /* overflow! */