--- uuid_cli.c 2004/01/18 19:59:13 1.11
+++ uuid_cli.c 2004/01/19 09:11:00 1.12
@@ -80,7 +80,6 @@
int iterate;
int raw;
int decode;
- char *cp;
void *vp;
size_t n;
unsigned int version;
@@ -151,11 +150,11 @@
error(1, "invalid length of UUID string representation");
if ((rc = uuid_import(uuid, UUID_FMT_STR, argv[0], strlen(argv[0]))) != UUID_RC_OK)
error(1, "uuid_parse: %s", uuid_error(rc));
- cp = NULL;
- if ((rc = uuid_export(uuid, UUID_FMT_TXT, (void **)&cp, NULL)) != UUID_RC_OK)
+ vp = NULL;
+ if ((rc = uuid_export(uuid, UUID_FMT_TXT, &vp, NULL)) != UUID_RC_OK)
error(1, "uuid_dump: %s", uuid_error(rc));
- fprintf(stdout, "%s", cp);
- free(cp);
+ fprintf(stdout, "%s", (char *)vp);
+ free(vp);
if ((rc = uuid_destroy(uuid)) != UUID_RC_OK)
error(1, "uuid_destroy: %s", uuid_error(rc));
}
@@ -193,11 +192,11 @@
free(vp);
}
else {
- cp = NULL;
- if ((rc = uuid_export(uuid, UUID_FMT_STR, (void **)&cp, &n)) != UUID_RC_OK)
+ vp = NULL;
+ if ((rc = uuid_export(uuid, UUID_FMT_STR, &vp, &n)) != UUID_RC_OK)
error(1, "uuid_format: %s", uuid_error(rc));
- fprintf(fp, "%s\n", cp);
- free(cp);
+ fprintf(fp, "%s\n", (char *)vp);
+ free(vp);
}
}
if ((rc = uuid_destroy(uuid)) != UUID_RC_OK)
|