ossp-pkg/sio/al.c 1.33 -> 1.34
--- al.c 2002/11/04 13:14:50 1.33
+++ al.c 2002/11/05 14:51:37 1.34
@@ -291,7 +291,7 @@
al_chunk_t *alc;
size_t len = AL_CHUNK_LEN(orig);
- if (off < 0 || off > len)
+ if (off > len)
return AL_ERR_ARG;
rc = new_chunk(al, orig->buf, orig->label, &alc);
@@ -326,7 +326,6 @@
/*
* find chunk that represents a particular offset
- * if off is negative, treat it as relative offset from the end
* a reference to the chunk is stored in *alcp
* the relative offset into the chunk is stored in *skipp
* return AL_OK and *alcp == NULL if positioned exactly to end of list
@@ -339,9 +338,6 @@
size_t pos, end;
size_t chunksize;
- if (off < 0) /* off is negative */
- off += al->bytes;
-
if ((al->bytes / 2) >= off) { /* FIXME poor man's heuristic */
/* forward search */
pos = 0;
|
|