Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
d3fb79b0
...
d3fb79b049f20b7d430f530c5bfc4b221960c8cc
authored
2001-07-27 09:37:20 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use x[mc]alloc() instead of util_[cm]alloc().
1 parent
c3c88289
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
8 deletions
mail/alias.c
mail/alt.c
mail/mail.c
mail/mailline.c
mail/shell.c
mail/unset.c
mail/var.c
mail/alias.c
View file @
d3fb79b
...
...
@@ -99,7 +99,7 @@ alias_rehash()
return
1
;
}
aliases
=
util_
calloc
(
hash_size
[
hash_num
],
sizeof
(
aliases
[
0
]));
aliases
=
x
calloc
(
hash_size
[
hash_num
],
sizeof
(
aliases
[
0
]));
if
(
old_aliases
)
{
for
(
i
=
0
;
i
<
hash_size
[
hash_num
-
1
];
i
++
)
...
...
mail/alt.c
View file @
d3fb79b
...
...
@@ -72,7 +72,7 @@ mail_set_my_name (char *name)
my_name
=
strdup
(
name
);
gethostname
(
hostname
,
sizeof
(
hostname
));
hostname
[
sizeof
(
hostname
)
-
1
]
=
0
;
my_email
=
util_
malloc
(
strlen
(
name
)
+
strlen
(
hostname
)
+
2
);
my_email
=
x
malloc
(
strlen
(
name
)
+
strlen
(
hostname
)
+
2
);
sprintf
(
my_email
,
"%s@%s"
,
name
,
hostname
);
}
...
...
mail/mail.c
View file @
d3fb79b
...
...
@@ -73,7 +73,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
int
len
;
char
*
home
=
getenv
(
"HOME"
);
len
=
strlen
(
home
)
+
strlen
(
"/mbox"
)
+
1
;
args
->
file
=
util_
malloc
(
len
*
sizeof
(
char
));
args
->
file
=
x
malloc
(
len
*
sizeof
(
char
));
strcpy
(
args
->
file
,
home
);
strcat
(
args
->
file
,
"/mbox"
);
}
...
...
@@ -401,7 +401,7 @@ mail_mainloop(char *(*input) __P((void *, int)), void *closure, int do_history)
break
;
}
command
[
len
-
1
]
=
'\0'
;
buf
=
util_
malloc
((
len
+
strlen
(
command2
))
*
sizeof
(
char
));
buf
=
x
malloc
((
len
+
strlen
(
command2
))
*
sizeof
(
char
));
strcpy
(
buf
,
command
);
strcat
(
buf
,
command2
);
free
(
command
);
...
...
mail/mailline.c
View file @
d3fb79b
...
...
@@ -470,7 +470,7 @@ readline (const char *prompt)
fflush
(
ofile
);
}
p
=
line
=
util_
calloc
(
1
,
255
);
p
=
line
=
x
calloc
(
1
,
255
);
alloclen
=
255
;
linelen
=
0
;
for
(;;)
...
...
mail/shell.c
View file @
d3fb79b
...
...
@@ -48,7 +48,7 @@ mail_shell (int argc, char **argv)
char
*
buf
=
NULL
;
/* 1(shell) + 1 (-c) + 1(arg) + 1 (null) = 4 */
argvec
=
util_
malloc
(
4
*
(
sizeof
(
char
*
)));
argvec
=
x
malloc
(
4
*
(
sizeof
(
char
*
)));
argcv_string
(
argc
-
1
,
&
argv
[
1
],
&
buf
);
...
...
mail/unset.c
View file @
d3fb79b
...
...
@@ -31,7 +31,7 @@ mail_unset (int argc, char **argv)
int
status
=
0
,
i
=
1
;
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
char
*
buf
=
util_
malloc
((
7
+
strlen
(
argv
[
i
]))
*
sizeof
(
char
));
char
*
buf
=
x
malloc
((
7
+
strlen
(
argv
[
i
]))
*
sizeof
(
char
));
strcpy
(
buf
,
"set no"
);
strcat
(
buf
,
argv
[
i
]);
if
(
!
util_do_command
(
buf
))
...
...
mail/var.c
View file @
d3fb79b
...
...
@@ -430,7 +430,7 @@ var_pipe(int argc, char **argv, struct send_environ *env)
close
(
fd
);
/* Execute the process */
xargv
=
util_
calloc
(
argc
,
sizeof
(
xargv
[
0
]));
xargv
=
x
calloc
(
argc
,
sizeof
(
xargv
[
0
]));
for
(
i
=
0
;
i
<
argc
-
1
;
i
++
)
xargv
[
i
]
=
argv
[
i
+
1
];
xargv
[
i
]
=
NULL
;
...
...
Please
register
or
sign in
to post a comment