Skip to content

Commit d008696

Browse files
Update cf-agent/nfs.c
Co-authored-by: Lars Erik Wik <[email protected]>
1 parent b59adcc commit d008696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cf-agent/nfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,8 @@ int VerifyInFstab(EvalContext *ctx, char *name, const Attributes *a, const Promi
486486
#elif defined(__linux__)
487487
if (StringEqual(fstype, "cifs") || StringEqual(fstype, "panfs"))
488488
{
489-
snprintf(fstab, CF_BUFSIZE, "%s%s \t %s \t %s \t %s", host, rmountpt, mountpt, fstype, opts);
489+
NDEBUG_UNUSED int ret = snprintf(fstab, CF_BUFSIZE, "%s%s \t %s \t %s \t %s", host, rmountpt, mountpt, fstype, opts);
490+
assert(ret >= 0 && ret < CF_BUFSIZE);
490491
}
491492
else
492493
{

0 commit comments

Comments
 (0)