Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
99b0835a
Commit
99b0835a
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Fixed gcc printf format warnings.
parent
139be2e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/sbbsecho.c
+34
-29
34 additions, 29 deletions
src/sbbs3/sbbsecho.c
with
34 additions
and
29 deletions
src/sbbs3/sbbsecho.c
+
34
−
29
View file @
99b0835a
...
...
@@ -358,7 +358,7 @@ int write_flofile(char *attachment, faddr_t dest)
strcpy
(
outbound
,
cfg
.
outbound
);
else
/* Inter-zone outbound is OUTBOUND.XXX */
sprintf
(
outbound
,
"%.*s.%03x/"
,
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
dest
.
zone
);
,
(
int
)
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
dest
.
zone
);
if
(
dest
.
point
)
{
/* Point destination is OUTBOUND\*.PNT */
sprintf
(
str
,
"%04x%04x.pnt"
,
dest
.
net
,
dest
.
node
);
...
...
@@ -1132,7 +1132,7 @@ void command(char *instr,faddr_t addr)
memset
(
&
del_area
,
0
,
sizeof
(
area_t
));
strupr
(
instr
);
if
((
p
=
strstr
(
instr
,
"HELP"
))
!=
NULL
)
{
sprintf
(
str
,
"%
s%
sAREAMGR.HLP"
,
scfg
.
exec_dir
);
sprintf
(
str
,
"%sAREAMGR.HLP"
,
scfg
.
exec_dir
);
if
(
!
fexist
(
str
))
return
;
if
((
stream
=
fnopen
(
&
file
,
str
,
O_RDONLY
))
==
NULL
)
{
...
...
@@ -1532,10 +1532,13 @@ char attachment(char *bundlename,faddr_t dest,char cleanup)
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
fmsghdr_t
))
{
printf
(
"
\7
ERROR %s has invalid length of %u bytes
\n
"
,
path
printf
(
"
\7
ERROR %s has invalid length of %lu bytes
\n
"
,
path
,
filelength
(
fmsg
));
logprintf
(
"ERROR line %d %s has invalid length of %lu bytes"
,
__LINE__
,
path
,
filelength
(
fmsg
));
logprintf
(
"ERROR line %d %s has invalid length of %u bytes"
,
__LINE__
,
path
,
filelength
(
fmsg
));
fclose
(
fidomsg
);
continue
;
}
...
...
@@ -1639,7 +1642,7 @@ void pack_bundle(char *infile,faddr_t dest)
strcpy
(
outbound
,
cfg
.
outbound
);
else
/* Inter-zone outbound is OUTBOUND.XXX */
sprintf
(
outbound
,
"%.*s.%03x/"
,
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
dest
.
zone
);
,
(
int
)
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
dest
.
zone
);
if
(
dest
.
point
)
{
/* Point destination is OUTBOUND\*.PNT */
sprintf
(
str
,
"%04x%04x.pnt"
,
dest
.
net
,
dest
.
node
);
...
...
@@ -2028,7 +2031,7 @@ ulong matchname(char *inname)
static
username_t
*
username
;
ulong
last_user
;
int
userdat
,
i
;
char
str
[
256
],
name
[
LEN_NAME
+
1
],
alias
[
LEN_ALIAS
+
1
]
,
c
;
char
str
[
256
],
name
[
LEN_NAME
+
1
],
alias
[
LEN_ALIAS
+
1
];
ulong
l
,
crc
;
if
(
!
total_users
)
{
/* Load CRCs */
...
...
@@ -2057,20 +2060,20 @@ if(!total_users) { /* Load CRCs */
read
(
userdat
,
name
,
LEN_NAME
);
lseek
(
userdat
,(
long
)(((
long
)
total_users
)
*
U_LEN
)
+
U_MISC
,
SEEK_SET
);
read
(
userdat
,
tmp
,
8
);
for
(
c
=
0
;
c
<
8
;
c
++
)
if
(
tmp
[
c
]
==
ETX
||
tmp
[
c
]
==
CR
)
break
;
tmp
[
c
]
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
if
(
tmp
[
i
]
==
ETX
||
tmp
[
i
]
==
CR
)
break
;
tmp
[
i
]
=
0
;
unlock
(
userdat
,(
long
)((
long
)(
total_users
)
*
U_LEN
)
+
U_ALIAS
,
LEN_ALIAS
+
LEN_NAME
);
if
(
ahtoul
(
tmp
)
&
DELETED
)
continue
;
for
(
c
=
0
;
c
<
LEN_ALIAS
;
c
++
)
if
(
alias
[
c
]
==
ETX
||
alias
[
c
]
==
CR
)
break
;
alias
[
c
]
=
0
;
for
(
i
=
0
;
i
<
LEN_ALIAS
;
i
++
)
if
(
alias
[
i
]
==
ETX
||
alias
[
i
]
==
CR
)
break
;
alias
[
i
]
=
0
;
strupr
(
alias
);
for
(
c
=
0
;
c
<
LEN_NAME
;
c
++
)
if
(
name
[
c
]
==
ETX
||
name
[
c
]
==
CR
)
break
;
name
[
c
]
=
0
;
for
(
i
=
0
;
i
<
LEN_NAME
;
i
++
)
if
(
name
[
i
]
==
ETX
||
name
[
i
]
==
CR
)
break
;
name
[
i
]
=
0
;
strupr
(
name
);
username
[
total_users
].
alias
=
crc32
(
alias
,
0
);
username
[
total_users
].
real
=
crc32
(
name
,
0
);
}
...
...
@@ -2321,8 +2324,8 @@ if((sbody=(char HUGE16 *)LMALLOC((length+1)*2))==NULL) {
smb_freemsgmem
(
&
msg
);
return
(
0
);
}
if
((
stail
=
(
char
HUGE16
*
)
LMALLOC
(
MAX_TAILLEN
))
==
NULL
)
{
printf
(
"ERROR allocating %
l
u bytes
\n
"
,
MAX_TAILLEN
);
logprintf
(
"ERROR line %d allocating %
l
u bytes for tail"
,
__LINE__
printf
(
"ERROR allocating %u bytes
\n
"
,
MAX_TAILLEN
);
logprintf
(
"ERROR line %d allocating %u bytes for tail"
,
__LINE__
,
MAX_TAILLEN
);
LFREE
(
sbody
);
smb_freemsgmem
(
&
msg
);
...
...
@@ -3038,9 +3041,9 @@ void attach_bundles(void)
logprintf
(
"ERROR line %d fdopening %s"
,
__LINE__
,
packet
);
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
pkthdr_t
))
{
printf
(
"ERROR invalid length of %u bytes for %s
\n
"
,
filelength
(
fmsg
)
printf
(
"ERROR invalid length of %
l
u bytes for %s
\n
"
,
filelength
(
fmsg
)
,
packet
);
logprintf
(
"ERROR line %d invalid length of %u bytes for %s"
logprintf
(
"ERROR line %d invalid length of %
l
u bytes for %s"
,
__LINE__
,
filelength
(
fmsg
),
packet
);
fclose
(
fidomsg
);
if
(
delfile
(
packet
))
...
...
@@ -3682,9 +3685,11 @@ void export_echomail(char *sub_code,faddr_t addr)
continue
;
}
fmsgbuf
=
MALLOC
(
strlen
((
char
*
)
buf
)
+
512
);
if
(
!
fmsgbuf
)
{
printf
(
"ERROR allocating %lu bytes for fmsgbuf
\n
"
);
printf
(
"ERROR allocating %lu bytes for fmsgbuf
\n
"
,
strlen
((
char
*
)
buf
)
+
512
);
logprintf
(
"ERROR line %d allocating %lu bytes for fmsgbuf"
,
__LINE__
,
strlen
((
char
*
)
buf
)
+
512
);
,
__LINE__
,
strlen
((
char
*
)
buf
)
+
512
);
smb_unlockmsghdr
(
&
smb
[
cur_smb
],
&
msg
);
smb_freemsgmem
(
&
msg
);
continue
;
}
...
...
@@ -4134,9 +4139,9 @@ int main(int argc, char **argv)
logprintf
(
"ERROR line %d fdopening %s"
,
__LINE__
,
packet
);
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
pkthdr_t
))
{
printf
(
"ERROR invalid length of %u bytes for %s
\n
"
,
filelength
(
fmsg
)
printf
(
"ERROR invalid length of %
l
u bytes for %s
\n
"
,
filelength
(
fmsg
)
,
packet
);
logprintf
(
"ERROR line %d invalid length of %u bytes for %s"
logprintf
(
"ERROR line %d invalid length of %
l
u bytes for %s"
,
__LINE__
,
filelength
(
fmsg
),
packet
);
fclose
(
fidomsg
);
if
(
delfile
(
packet
))
...
...
@@ -4205,7 +4210,7 @@ int main(int argc, char **argv)
,
sys_errlist
[
errno
]);
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
pkthdr_t
))
{
printf
(
"
\7
Invalid length of %u bytes
\n
"
,
filelength
(
fmsg
));
printf
(
"
\7
Invalid length of %
l
u bytes
\n
"
,
filelength
(
fmsg
));
fclose
(
fidomsg
);
continue
;
}
...
...
@@ -4612,9 +4617,9 @@ int main(int argc, char **argv)
,
sys_errlist
[
errno
]);
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
fmsghdr_t
))
{
printf
(
"
\7
ERROR invalid length of %u bytes for %s
\n
"
,
filelength
(
fmsg
)
printf
(
"
\7
ERROR invalid length of %
l
u bytes for %s
\n
"
,
filelength
(
fmsg
)
,
path
);
logprintf
(
"ERROR line %d invalid length of %u bytes for %s"
,
__LINE__
logprintf
(
"ERROR line %d invalid length of %
l
u bytes for %s"
,
__LINE__
,
filelength
(
fmsg
),
path
);
fclose
(
fidomsg
);
continue
;
}
...
...
@@ -4674,7 +4679,7 @@ for(f=0;f<g.gl_pathc && !kbhit();f++) {
,
sys_errlist
[
errno
]);
continue
;
}
if
(
filelength
(
fmsg
)
<
sizeof
(
fmsghdr_t
))
{
printf
(
"
\7
%s Invalid length of %u bytes
\n
"
,
path
,
filelength
(
fmsg
));
printf
(
"
\7
%s Invalid length of %
l
u bytes
\n
"
,
path
,
filelength
(
fmsg
));
fclose
(
fidomsg
);
continue
;
}
if
(
fread
(
&
hdr
,
sizeof
(
fmsghdr_t
),
1
,
fidomsg
)
!=
1
)
{
...
...
@@ -4733,7 +4738,7 @@ for(f=0;f<g.gl_pathc && !kbhit();f++) {
strcpy
(
outbound
,
cfg
.
outbound
);
else
/* Inter-zone outbound is OUTBOUND.XXX */
sprintf
(
outbound
,
"%.*s.%03X/"
,
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
addr
.
zone
);
,
(
int
)
strlen
(
cfg
.
outbound
)
-
1
,
cfg
.
outbound
,
addr
.
zone
);
if
(
addr
.
point
)
{
/* Point destination is OUTBOUND.PNT */
sprintf
(
str
,
"%04X%04X.PNT"
,
addr
.
net
,
addr
.
node
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment