static NOINLINE
void sendMTFValues(EState* s)
{
- int32_t v, t, i, j, gs, ge, totc, bt, bc, iter;
+ int32_t v, t, i, j, gs, ge, bt, bc, iter;
int32_t nSelectors, alphaSize, minLen, maxLen, selCtr;
int32_t nGroups;
}
#endif
nSelectors = 0;
- totc = 0;
gs = 0;
while (1) {
/*--- Set group start & end marks. --*/
bt = t;
}
}
- totc += bc;
fave[bt]++;
s->selector[nSelectors] = bt;
nSelectors++;
/* Dumb little test thing, decompress stdin to stdout */
int main(int argc, char **argv)
{
- int i;
char c;
int i = unpack_bz2_stream(0, 1);
}
/* Find minimum and maximum length, bound *m by those */
- for (j = 1; (c[j] == 0) && (j <= BMAX); j++)
+ for (j = 1; (j <= BMAX) && (c[j] == 0); j++)
continue;
k = j; /* minimum code length */
for (i = BMAX; (c[i] == 0) && i; i--)
}
s->m_len = 1;
- s->m_len = 1;
#ifdef SWD_BEST_OFF
if (s->use_best_off)
memset(s->best_pos, 0, sizeof(s->best_pos));
extern blkid_dev blkid_new_dev(void);
extern void blkid_free_dev(blkid_dev dev);
-#ifdef __cplusplus
-}
-#endif
-
#endif
argv[0], ret);
exit(1);
}
- if ((ret = blkid_probe_all(cache) < 0))
+ if ((ret = blkid_probe_all(cache)) < 0)
fprintf(stderr, "error probing devices\n");
blkid_put_cache(cache);
void usage(char *prog)
{
fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask]\n", prog);
- fprintf(stderr, "\tList all devices and exit\n", prog);
+ fprintf(stderr, "\tList all devices and exit\n");
exit(1);
}
case 'm':
blkid_debug_mask = strtoul (optarg, &tmp, 0);
if (*tmp) {
- fprintf(stderr, "Invalid debug mask: %d\n",
+ fprintf(stderr, "Invalid debug mask: %s\n",
optarg);
exit(1);
}
continue;
end = strlen(buf) - 1;
/* Continue reading next line if it ends with a backslash */
- while (buf[end] == '\\' && end < sizeof(buf) - 2 &&
+ while (end < sizeof(buf) - 2 && buf[end] == '\\' &&
fgets(buf + end, sizeof(buf) - end, file)) {
end = strlen(buf) - 1;
lineno++;
fprintf(stderr, "Usage: %s [-f blkid_file] [-m debug_mask] device "
"[type value]\n",
prog);
- fprintf(stderr, "\tList all tags for a device and exit\n", prog);
+ fprintf(stderr, "\tList all tags for a device and exit\n");
exit(1);
}
case 'm':
blkid_debug_mask = strtoul (optarg, &tmp, 0);
if (*tmp) {
- fprintf(stderr, "Invalid debug mask: %d\n",
+ fprintf(stderr, "Invalid debug mask: %s\n",
optarg);
exit(1);
}
dev = blkid_get_dev(cache, devname, flags);
if (!dev) {
- fprintf(stderr, "%s: cannot find device in blkid cache\n");
+ fprintf(stderr, "%s: cannot find device in blkid cache\n", devname);
exit(1);
}
if (search_type) {
refcount->size = size;
bytes = (size_t) (size * sizeof(struct ea_refcount_el));
#ifdef DEBUG
- printf("Refcount allocated %d entries, %d bytes.\n",
+ printf("Refcount allocated %d entries, %lu bytes.\n",
refcount->size, bytes);
#endif
retval = ext2fs_get_mem(bytes, &refcount->list);
continue;
}
if ((inode->i_links_count || inode->i_blocks ||
- inode->i_blocks || inode->i_block[0]) &&
+ inode->i_block[0]) &&
fix_problem(ctx, PR_1_JOURNAL_INODE_NOT_CLEAR,
&pctx)) {
memset(inode, 0, inode_size);
void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
const char *description)
{
- void *ret;
- char buf[256];
-
- ret = xzalloc(size);
- return ret;
+ return xzalloc(size);
}
static char *string_copy(const char *str, int len)
if (rsv_gdb > EXT2_ADDR_PER_BLOCK(sb))
rsv_gdb = EXT2_ADDR_PER_BLOCK(sb);
#ifdef RES_GDT_DEBUG
- printf("max_blocks %lu, rsv_groups = %lu, rsv_gdb = %lu\n",
+ printf("max_blocks %lu, rsv_groups = %lu, rsv_gdb = %u\n",
max_blocks, rsv_groups, rsv_gdb);
#endif
/* If it's in the cache, use it! */
if ((cache = find_cached_block(data, block, &reuse[0]))) {
#ifdef DEBUG
- printf("Using cached block %d\n", block);
+ printf("Using cached block %lu\n", block);
#endif
memcpy(cp, cache->buf, channel->block_size);
count--;
if (find_cached_block(data, block+i, &reuse[i]))
break;
#ifdef DEBUG
- printf("Reading %d blocks starting at %d\n", i, block);
+ printf("Reading %d blocks starting at %lu\n", i, block);
#endif
if ((retval = raw_read_blk(channel, data, block, i, cp)))
return retval;
progress_fd = 0;
else {
goto next_arg;
- i++;
}
}
break;
struct progress_struct *progress,
blk_t *ret_blk, int *ret_count)
{
- int j, count, next_update, next_update_incr;
+ int j, count, next_update;
static char *buf;
errcode_t retval;
}
/* OK, do the write loop */
next_update = 0;
- next_update_incr = num / 100;
- if (next_update_incr < 1)
- next_update_incr = 1;
+
for (j=0; j < num; j += STRIDE_LENGTH, blk += STRIDE_LENGTH) {
count = num - j;
if (count > STRIDE_LENGTH)
}
if (strcmp(token, "device") == 0) {
*journal_device = blkid_get_devname(NULL, arg, NULL);
- if (!journal_device) {
+ if (!*journal_device) {
journal_usage++;
continue;
}
/* Get the length of the salt including "$1$" */
sl = 3;
- while (salt[sl] && salt[sl] != '$' && sl < (3 + 8))
+ while (sl < (3 + 8) && salt[sl] && salt[sl] != '$')
sl++;
/* Hash. the password first, since that is what is most unknown */
full_write(record_fd, buf+buf_len, 1);
}
// dump device input if ECHO ON
- if (echo > 0) {
+ if (echo) {
// if (buf[buf_len] < ' ') {
// full_write(STDERR_FILENO, "^", 1);
// buf[buf_len] += '@';
static int print_filter(const struct sockaddr_nl *who UNUSED_PARAM,
struct nlmsghdr *hdr, void *arg UNUSED_PARAM)
{
- struct tcmsg *msg = NLMSG_DATA(hdr);
- int len = hdr->nlmsg_len;
- struct rtattr * tb[TCA_MAX+1];
return 0;
}
common_traceroute_main(int op, char **argv)
{
int minpacket;
+#ifdef IP_TOS
int tos = 0;
+#endif
int max_ttl = 30;
int nprobes = 3;
int first_ttl = 1;
if (op & OPT_IP_CHKSUM)
bb_error_msg("warning: ip checksums disabled");
#endif
+#ifdef IP_TOS
if (op & OPT_TOS)
tos = xatou_range(tos_str, 0, 255);
+#endif
if (op & OPT_MAX_TTL)
max_ttl = xatou_range(max_ttl_str, 1, 255);
if (op & OPT_PORT)
if (id->partition_count < 4)
id->partition_count = 4;
- p = &id->partitions[id->partition_count];
+// p = &id->partitions[id->partition_count];
// if (is_raid(part[i].sys_ind))
// volume_id_set_usage_part(p, VOLUME_ID_RAID);