{
time_t timestamp = ub->ub_timestamp;
- (void) printf(header ? header : "");
+ (void) printf("%s", header ? header : "");
(void) printf("\tmagic = %016llx\n", (u_longlong_t)ub->ub_magic);
(void) printf("\tversion = %llu\n", (u_longlong_t)ub->ub_version);
(void) printf("\ttxg = %llu\n", (u_longlong_t)ub->ub_txg);
sprintf_blkptr(blkbuf, &ub->ub_rootbp);
(void) printf("\trootbp = %s\n", blkbuf);
}
- (void) printf(footer ? footer : "");
+ (void) printf("%s", footer ? footer : "");
}
static void
{
if (flags & ZDB_FLAG_BSWAP)
byteswap_uint64_array(buf, size);
- (void) write(1, buf, size);
+ VERIFY(write(fileno(stdout), buf, size) == size);
}
static void
return (vd);
fsize = lseek(fd, 0, SEEK_END);
- (void) ftruncate(fd, *newsize);
+ VERIFY(ftruncate(fd, *newsize) == 0);
if (zopt_verbose >= 6) {
(void) printf("%s grew from %lu to %lu bytes\n",
process_options(argc, argv);
/* Override location of zpool.cache */
- (void) asprintf((char **)&spa_config_path, "%s/zpool.cache", zopt_dir);
+ VERIFY(asprintf((char **)&spa_config_path, "%s/zpool.cache",
+ zopt_dir) != -1);
/*
* Blow away any existing copy of zpool.cache
{
char errmsg[] = "out of memory -- generating core dump\n";
- write(fileno(stderr), errmsg, sizeof (errmsg));
+ (void) fprintf(stderr, "%s", errmsg);
abort();
return (0);
}