little style fixes

This commit is contained in:
Michael Stapelberg 2010-07-24 12:34:27 +02:00
parent a6e7894b11
commit 6e5e2fe5ee
1 changed files with 2 additions and 3 deletions

View File

@ -52,11 +52,10 @@ char *resolve_tilde(const char *path) {
int res = glob(head, GLOB_TILDE, NULL, &globbuf); int res = glob(head, GLOB_TILDE, NULL, &globbuf);
free(head); free(head);
/* no match, or many wildcard matches are bad */ /* no match, or many wildcard matches are bad */
if(res == GLOB_NOMATCH || globbuf.gl_pathc != 1) if (res == GLOB_NOMATCH || globbuf.gl_pathc != 1)
result = sstrdup(path); result = sstrdup(path);
else if (res != 0) { else if (res != 0)
die("glob() failed"); die("glob() failed");
}
else { else {
head = globbuf.gl_pathv[0]; head = globbuf.gl_pathv[0];
result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1); result = scalloc(strlen(head) + (tail ? strlen(tail) : 0) + 1);