/[path-sandbox]/trunk/libsbutil/sbutil.c
Gentoo

Diff of /trunk/libsbutil/sbutil.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 313 Revision 314
109 errno = 0; 109 errno = 0;
110 110
111 return 0; 111 return 0;
112} 112}
113 113
114long file_length(int fd)
115{
116 struct stat st;
117 int retval;
118
119 retval = fstat(fd, &st);
120 if (-1 == retval)
121 return 0;
122
123 return (st.st_size);
124}
125
126bool is_env_on (const char *env) 114bool is_env_on (const char *env)
127{ 115{
128 if ((NULL != env) && (NULL != getenv(env)) && 116 if ((NULL != env) && (NULL != getenv(env)) &&
129 ((0 == strncasecmp(getenv(env), "1", 1)) || 117 ((0 == strncasecmp(getenv(env), "1", 1)) ||
130 (0 == strncasecmp(getenv(env), "true", 4)) || 118 (0 == strncasecmp(getenv(env), "true", 4)) ||

Legend:
Removed from v.313  
changed lines
  Added in v.314

  ViewVC Help
Powered by ViewVC 1.1.20