X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=4650990510414df57366c88cc1d40495f7b29f17;hb=b94ad75e5ded18d7dcafd69070f79838e0ebf24f;hp=4f5cf9ed78cc93be6e1be821ed5ae2604c4dc7f6;hpb=e6dd0f825da9bf68c7642f45afd069500879f5e2;p=st.git diff --git a/st.c b/st.c index 4f5cf9e..4650990 100644 --- a/st.c +++ b/st.c @@ -4010,7 +4010,6 @@ usage(void) { int main(int argc, char *argv[]) { - char *titles; uint cols = 80, rows = 24; xw.l = xw.t = 0; @@ -4028,10 +4027,8 @@ main(int argc, char *argv[]) { /* eat all remaining arguments */ if(argc > 1) { opt_cmd = &argv[1]; - if(argv[1] != NULL && opt_title == NULL) { - titles = xstrdup(argv[1]); - opt_title = basename(titles); - } + if(argv[1] != NULL && opt_title == NULL) + opt_title = basename(xstrdup(argv[1])); } goto run; case 'f':