small fixes:

fix xstrdup to not grossly overallocate memory
use xopen instean of xopen3 in several places
etc.
This commit is contained in:
Denis Vlasenko 2006-11-26 15:45:17 +00:00
parent c1660fea6d
commit cf749bc10c
9 changed files with 35 additions and 24 deletions

View file

@ -73,7 +73,7 @@ static void make_device(char *path, int delete)
line++;
/* find end of this line */
for(end=pos; end-conf<len && *end!='\n'; end++)
for (end=pos; end-conf<len && *end!='\n'; end++)
;
/* Three fields: regex, uid:gid, mode */
@ -111,7 +111,7 @@ static void make_device(char *path, int delete)
char *s, *s2;
/* Find : */
for(s=pos; s<end2 && *s!=':'; s++)
for (s=pos; s<end2 && *s!=':'; s++)
;
if (s == end2) break;