PATCH: unsigned/signed #4
andreas moroder
claudiamoroder at st-ulrich.suedtirol.net
Sat Feb 23 10:07:02 GMT 2002
Hello,
here another series of patches that clean up assignments of signed variable
to unsigned one.
Before I start with the small patches I would like to direct your attention
to rpc_parse/parse_dfs.c at line 311. Here -1 is assigned to a unsigned
variable. Was the intentio to assign 0xff or is this a error ?
Bye
Andreas
--- rpc_client/cli_pipe.c Sat Feb 23 18:00:55 2002
+++ rpc_client/cli_pipe.and Sat Feb 23 18:01:09 2002
@@ -727,7 +727,7 @@
Creates a DCE/RPC request.
********************************************************************/
-static BOOL create_rpc_request(prs_struct *rpc_out, uint8 op_num, int
data_len, int auth_len)
+static BOOL create_rpc_request(prs_struct *rpc_out, uint8 op_num, uint32
data_len, int auth_len)
{
uint32 alloc_hint;
RPC_HDR hdr;
@@ -801,7 +801,7 @@
* The auth_len doesn't include the RPC_HDR_AUTH_LEN.
*/
- auth_len = (auth_verify ? RPC_AUTH_NTLMSSP_CHK_LEN : 0);
+ auth_len = (uint32) (auth_verify ? RPC_AUTH_NTLMSSP_CHK_LEN : 0);
/*
* PDU len is header, plus request header, plus data, plus
--- libsmb/clifile.c Fri Feb 8 19:06:50 2002
+++ libsmb/clifile.and Sat Feb 23 13:08:25 2002
@@ -442,7 +442,7 @@
WARNING: if you open with O_WRONLY then getattrE won't work!
****************************************************************************/
-int cli_open(struct cli_state *cli, const char *fname, int flags, int
share_mode)
+int cli_open(struct cli_state *cli, const char *fname, int flags, unsigned
share_mode)
{
char *p;
unsigned openfn=0;
--- nmbd/nmbd_serverlistdb.c Fri Feb 8 19:07:10 2002
+++ nmbd/nmbd_serverlistdb.and Sat Feb 23 13:15:47 2002
@@ -128,7 +128,7 @@
****************************************************************************/
struct server_record *create_server_on_workgroup(struct work_record *work,
- char *name,int servertype,
+ char *name,uint32
servertype,
int ttl,char *comment)
{
struct server_record *servrec;
--- rpc_parse/parse_misc.c Sat Feb 23 18:48:36 2002
+++ rpc_parse/parse_misc.and Sat Feb 23 18:49:20 2002
@@ -397,7 +397,7 @@
Inits a BUFHDR structure.
********************************************************************/
-void init_buf_hdr(BUFHDR *hdr, int max_len, int len)
+void init_buf_hdr(BUFHDR *hdr, uint32 max_len, uint32 len)
{
hdr->buf_max_len = max_len;
hdr->buf_len = len;
More information about the samba-technical
mailing list