From 75928247d3c6bebc5121b0ef6039c07643a57d65 Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Sun, 22 Oct 2000 15:04:41 +0000 Subject: [PATCH] 2000-10-22 Andrew V. Samoilov * samba/libsmb/nterr.c (nt_errs): constified * samba/libsmb/smberr.c (dos_msgs, server_msgs, hard_msgs, err_classes): ditto (smb_errstr): err constified to avoid warnings --- vfs/samba/libsmb/nterr.c | 2 +- vfs/samba/libsmb/smberr.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vfs/samba/libsmb/nterr.c b/vfs/samba/libsmb/nterr.c index d2f933500..f81f7f25b 100644 --- a/vfs/samba/libsmb/nterr.c +++ b/vfs/samba/libsmb/nterr.c @@ -10,7 +10,7 @@ typedef struct } nt_err_code_struct; -nt_err_code_struct nt_errs[] = +nt_err_code_struct const nt_errs[] = { { "NT_STATUS_UNSUCCESSFUL", NT_STATUS_UNSUCCESSFUL }, { "NT_STATUS_NOT_IMPLEMENTED", NT_STATUS_NOT_IMPLEMENTED }, diff --git a/vfs/samba/libsmb/smberr.c b/vfs/samba/libsmb/smberr.c index c2d8884d7..2acfc822f 100644 --- a/vfs/samba/libsmb/smberr.c +++ b/vfs/samba/libsmb/smberr.c @@ -35,7 +35,7 @@ typedef struct } err_code_struct; /* Dos Error Messages */ -err_code_struct dos_msgs[] = { +static err_code_struct const dos_msgs[] = { {"ERRbadfunc",1,"Invalid function."}, {"ERRbadfile",2,"File not found."}, {"ERRbadpath",3,"Directory invalid."}, @@ -68,7 +68,7 @@ err_code_struct dos_msgs[] = { {NULL,-1,NULL}}; /* Server Error Messages */ -err_code_struct server_msgs[] = { +static err_code_struct const server_msgs[] = { {"ERRerror",1,"Non-specific error code."}, {"ERRbadpw",2,"Bad password - name/password pair in a Tree Connect or Session Setup are invalid."}, {"ERRbadtype",3,"reserved."}, @@ -104,7 +104,7 @@ err_code_struct server_msgs[] = { {NULL,-1,NULL}}; /* Hard Error Messages */ -err_code_struct hard_msgs[] = { +static err_code_struct const hard_msgs[] = { {"ERRnowrite",19,"Attempt to write on write-protected diskette."}, {"ERRbadunit",20,"Unknown unit."}, {"ERRnotready",21,"Drive not ready."}, @@ -130,8 +130,8 @@ struct { int code; char *class; - err_code_struct *err_msgs; -} err_classes[] = { + err_code_struct const *err_msgs; +} const err_classes [] = { {0,"SUCCESS",NULL}, {0x01,"ERRDOS",dos_msgs}, {0x02,"ERRSRV",server_msgs}, @@ -159,7 +159,7 @@ char *smb_errstr(char *inbuf) { if (err_classes[i].err_msgs) { - err_code_struct *err = err_classes[i].err_msgs; + const err_code_struct *err = err_classes[i].err_msgs; for (j=0;err[j].name;j++) if (num == err[j].code) {