It's longer than yours because it's better. Your version will always deinitialize ISFS regardless of if the program still wants to use it and the boolean result isn't globally stored, so the test gets executed every time the function is called. When you put a function in a library like obcd has done here it is wise to make the best effort to protect against people doing stupid things with it.