rem: char buf[1024];
context: main(int argc, char *argv[]){	int rc;	int rc2;	int count = 0;	struct stat st;	char *arg;	int ch;	uint64 totbytes = 0;		disp_func = display;		while ((ch = getopt(argc, argv, "al")) != -1) {		switch (ch) {			case 'a':				show_all = 1;				break;			case 'l':				disp_func = display_l;				break;		}	}	argc -= optind;	argv += optind;	if (*argv == NULL)		arg = ".";	else		arg = *argv;		rc = stat(arg, &st);	if (rc < 0) {		printf("%s: %s: %s\n", __progname,		       arg, strerror(rc));		goto err_ls;	}	if (S_ISDIR(st.st_mode)) {		char buf[1024];		DIR *thedir = opendir(arg);				if (!thedir) {			printf("ls: %s: %s\n", arg, strerror(errno));		} else {			if (show_all) {				/* process the '.' entry */				rc = stat(arg, &st);				if (rc == 0) {					(*disp_func)(arg, ".", &st);					totbytes += st.st_size;				}			}						for(;;) {				char buf2[1024];				struct dirent *de = readdir(thedir);				if (!de)					break;				memset(buf2, 0, sizeof(buf2));				if (strcmp(arg, ".") != 0) {					strlcpy(buf2, arg, sizeof(buf2));					strlcat(buf2, "/", sizeof(buf2));				}				strlcat(buf2, de->d_name, sizeof(buf2));				rc2 = lstat(buf2, &st);				if (rc2 == 0) {					(*disp_func)(buf2, de->d_name, &st);					totbytes += st.st_size;				}				count++;			}			closedir(thedir);		}		printf("%lld bytes in %d files\n", totbytes, count);	} else {		(*disp_func)(arg, arg, &st);	}err_ls:	return 0;}