diff mbox series

[1/2] swupdate-sysrestart: Remove unused variable tmpdir

Message ID 20200610075821.9846-1-christian.storm@siemens.com
State Accepted
Headers show
Series [1/2] swupdate-sysrestart: Remove unused variable tmpdir | expand

Commit Message

Christian Storm June 10, 2020, 7:58 a.m. UTC
Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 tools/swupdate-sysrestart.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Stefano Babic June 10, 2020, 10:34 a.m. UTC | #1
On 10.06.20 09:58, Christian Storm wrote:
> Signed-off-by: Christian Storm <christian.storm@siemens.com>
> ---
>  tools/swupdate-sysrestart.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/tools/swupdate-sysrestart.c b/tools/swupdate-sysrestart.c
> index 31cb29a..4f9f66e 100644
> --- a/tools/swupdate-sysrestart.c
> +++ b/tools/swupdate-sysrestart.c
> @@ -134,7 +134,6 @@ int main(int argc, char **argv)
>  {
>  	int connfd;
>  	struct progress_msg msg;
> -	const char *tmpdir;
>  	int opt_w = 0;
>  	int c;
>  	int ret;
> @@ -163,10 +162,6 @@ int main(int argc, char **argv)
>  		}
>  	}
>  
> -	tmpdir = getenv("TMPDIR");
> -	if (!tmpdir)
> -		tmpdir = "/tmp";
> -
>  	/* initialize CURL */
>  	ret = curl_global_init(CURL_GLOBAL_DEFAULT);
>  	if (ret != CURLE_OK) {
> 
Ouch, never seen, thanks !

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/tools/swupdate-sysrestart.c b/tools/swupdate-sysrestart.c
index 31cb29a..4f9f66e 100644
--- a/tools/swupdate-sysrestart.c
+++ b/tools/swupdate-sysrestart.c
@@ -134,7 +134,6 @@  int main(int argc, char **argv)
 {
 	int connfd;
 	struct progress_msg msg;
-	const char *tmpdir;
 	int opt_w = 0;
 	int c;
 	int ret;
@@ -163,10 +162,6 @@  int main(int argc, char **argv)
 		}
 	}
 
-	tmpdir = getenv("TMPDIR");
-	if (!tmpdir)
-		tmpdir = "/tmp";
-
 	/* initialize CURL */
 	ret = curl_global_init(CURL_GLOBAL_DEFAULT);
 	if (ret != CURLE_OK) {