mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
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:
parent
df0b2d6775
commit
860c34ba93
@ -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, ¢ry, sizeof(centry));
|
||||
if (code)
|
||||
return PRDBFAIL;
|
||||
|
||||
/* Now add the new user entry to the database */
|
||||
tentry.creator = creator;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user