The ka_IsZero and ka_PrintBytes function just use char strings. Cast
directly, rather than going via a helper functions to simplify this
code.
The helper functions add complexity, and additional dependencies which
cause problems with some uses of this code.
Change-Id: I831ff0f8fbecec602d8c2b9112675938facfb06b
Reviewed-on: http://gerrit.openafs.org/7066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
break;
everWorked = 1;
/* first check if key is returned */
- if ((!ka_KeyIsZero(ktc_to_charptr(&tkey), sizeof(tkey))) && (as->parms[1].items)) {
+ if ((!ka_KeyIsZero((char *)&tkey, sizeof(tkey)))
+ && (as->parms[1].items)) {
printf("key %d is '", kvno);
- ka_PrintBytes(ktc_to_charptr(&tkey), sizeof(tkey));
+ ka_PrintBytes((char *)&tkey, sizeof(tkey));
printf("'\n");
} else {
if (keyInfo.keyCheckSum == 0) /* shouldn't happen */
exit(1);
}
ka_StringToKey(buf, tcell, &tkey);
- code = afsconf_AddKey(tdir, kvno, ktc_to_charptr(&tkey), 0);
+ code = afsconf_AddKey(tdir, kvno, (char *)&tkey, 0);
if (code) {
printf("bos_util: failed to set key, code %d.\n", code);
exit(1);