From 420cf7f0a650e711e50dc49b3e5faf4a7ceffa0e Mon Sep 17 00:00:00 2001 From: Axel Wagner Date: Fri, 17 May 2013 01:02:33 +0200 Subject: [PATCH] Use cbool-helper in Discover() --- git.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/git.go b/git.go index e11f676..fdc640a 100644 --- a/git.go +++ b/git.go @@ -134,14 +134,7 @@ func Discover(start string, across_fs bool, ceiling_dirs []string) (string, erro retpath := (*C.char)(C.malloc(C.GIT_PATH_MAX)) defer C.free(unsafe.Pointer(retpath)) - var acrfs C.int - if across_fs { - acrfs = 1 - } else { - acrfs = 0 - } - - r := C.git_repository_discover(retpath, C.GIT_PATH_MAX, cstart, acrfs, ceildirs) + r := C.git_repository_discover(retpath, C.GIT_PATH_MAX, cstart, cbool(across_fs), ceildirs) if r == 0 { return C.GoString(retpath), nil