Remove dead code, sprintf_alloc() cannot fail. Opkg will exit instead.
[oweals/opkg-lede.git] / libopkg / opkg_conf.c
index 9c1ed34f2aea26e3a432470bde84d3483ccac5ae..acac1b49894d7e92b1baf2f6aaf283460f9d3cc7 100644 (file)
@@ -484,11 +484,6 @@ opkg_conf_load(void)
        else
                sprintf_alloc (&lock_file, "%s", OPKGLOCKFILE);
 
        else
                sprintf_alloc (&lock_file, "%s", OPKGLOCKFILE);
 
-       if (lock_file == NULL) {
-               opkg_perror(ERROR, "Could not allocate memory for lock file name");
-               goto err2;
-       }
-
        lock_fd = creat(lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
        if (lock_fd == -1) {
                opkg_perror(ERROR, "Could not create lock file %s", lock_file);
        lock_fd = creat(lock_file, S_IRUSR | S_IWUSR | S_IRGRP);
        if (lock_fd == -1) {
                opkg_perror(ERROR, "Could not create lock file %s", lock_file);