contrib/chg/util.c
changeset 28854 ddef14468952
parent 28788 57a78a64de44
child 28855 f5764e177bbe
equal deleted inserted replaced
28853:d11548b4ae45 28854:ddef14468952
    80 	fputs("chg: debug: ", stderr);
    80 	fputs("chg: debug: ", stderr);
    81 	vfprintf(stderr, fmt, args);
    81 	vfprintf(stderr, fmt, args);
    82 	fsetcolor(stderr, "");
    82 	fsetcolor(stderr, "");
    83 	fputc('\n', stderr);
    83 	fputc('\n', stderr);
    84 	va_end(args);
    84 	va_end(args);
       
    85 }
       
    86 
       
    87 void fchdirx(int dirfd)
       
    88 {
       
    89 	int r = fchdir(dirfd);
       
    90 	if (r == -1)
       
    91 		abortmsgerrno("failed to fchdir");
    85 }
    92 }
    86 
    93 
    87 void *mallocx(size_t size)
    94 void *mallocx(size_t size)
    88 {
    95 {
    89 	void *result = malloc(size);
    96 	void *result = malloc(size);