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.
Reviewed-on: http://gerrit.openafs.org/7066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit
46c5aabfc6f5af2875e8b20252a17955ad89dd38)
Change-Id: Ifee3178e5cdc2eab947f759541864ecea4345b7a
Reviewed-on: http://gerrit.openafs.org/10867
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
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);