mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
check config_new return value
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
fb8437b588
commit
b0dc547fcb
@ -1045,7 +1045,10 @@ int main(int argc, char *argv[])
|
|||||||
setuseragent();
|
setuseragent();
|
||||||
|
|
||||||
/* init config data */
|
/* init config data */
|
||||||
config = config_new();
|
if(!(config = config_new())) {
|
||||||
|
/* config_new prints the appropriate error message */
|
||||||
|
cleanup(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* disable progressbar if the output is redirected */
|
/* disable progressbar if the output is redirected */
|
||||||
if(!isatty(fileno(stdout))) {
|
if(!isatty(fileno(stdout))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user