summaryrefslogtreecommitdiff
path: root/lib/libFS/src/FSErrDis.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libFS/src/FSErrDis.c')
-rw-r--r--lib/libFS/src/FSErrDis.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/libFS/src/FSErrDis.c b/lib/libFS/src/FSErrDis.c
index cc4abf4b0..244e0a4d7 100644
--- a/lib/libFS/src/FSErrDis.c
+++ b/lib/libFS/src/FSErrDis.c
@@ -76,13 +76,13 @@ int FSErrorListSize = sizeof(FSErrorList);
/* ARGSUSED */
-int FSGetErrorDatabaseText(svr, name, type, defaultp, buffer, nbytes)
- register char *name,
- *type;
- char *defaultp;
- FSServer *svr;
- char *buffer;
- int nbytes;
+int FSGetErrorDatabaseText(
+ FSServer *svr,
+ register char *name,
+ register char *type,
+ char *defaultp,
+ char *buffer,
+ int nbytes)
{
if (nbytes == 0)
return 0;
@@ -92,11 +92,11 @@ int FSGetErrorDatabaseText(svr, name, type, defaultp, buffer, nbytes)
return 1;
}
-int FSGetErrorText(svr, code, buffer, nbytes)
- register int code;
- register FSServer *svr;
- char *buffer;
- int nbytes;
+int FSGetErrorText(
+ register FSServer *svr,
+ register int code,
+ char *buffer,
+ int nbytes)
{
char *defaultp = NULL;
@@ -105,7 +105,7 @@ int FSGetErrorText(svr, code, buffer, nbytes)
if (nbytes == 0)
return 0;
- sprintf(buf, "%d", code);
+ snprintf(buf, sizeof(buf), "%d", code);
if (code <= (FSErrorListSize / sizeof(char *)) && code > 0) {
defaultp = FSErrorList[code];
FSGetErrorDatabaseText(svr, "FSProtoError", buf, defaultp, buffer, nbytes);