ptserver: Don't ignore ubik_Write failures

If we can't write to the ubik database, then that's a bad thing.
Don't ignore it.

Caught by clang-analyzer

Change-Id: I08b57a74405cc563c6141251fd3d433b2904ea0e
Reviewed-on: http://gerrit.openafs.org/9176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
Simon Wilkinson 2013-02-19 15:43:29 +00:00 committed by Derrick Brashear
parent df0b2d6775
commit 860c34ba93
2 changed files with 6 additions and 0 deletions

View File

@ -445,6 +445,8 @@ CreateEntry(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid, af
/* write updated entry for group */
code = pr_Write(at, 0, pos, &centry, sizeof(centry));
if (code)
return PRDBFAIL;
/* Now add the new user entry to the database */
tentry.creator = creator;

View File

@ -479,6 +479,8 @@ RemoveFromIDHash(struct ubik_trans *tt, afs_int32 aid, afs_int32 *loc) /* ??? i
return PRDBFAIL;
bentry.nextID = tentry.nextID;
code = pr_WriteEntry(tt, 0, trail, &bentry);
if (code)
return PRDBFAIL;
}
*loc = current;
return PRSUCCESS;
@ -557,6 +559,8 @@ RemoveFromNameHash(struct ubik_trans *tt, char *aname, afs_int32 *loc)
return PRDBFAIL;
bentry.nextName = tentry.nextName;
code = pr_WriteEntry(tt, 0, trail, &bentry);
if (code)
return PRDBFAIL;
}
*loc = current;
return PRSUCCESS;