/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
int i;
while (*cp1 && *cp1 != ' ')
cp1++;
- if (cp1 - cp0 >= sizeof(buf))
+ if (cp1 - cp0 >= (ptrdiff_t) sizeof(buf))
break;
memcpy(buf, cp0, cp1 - cp0);
buf[cp1-cp0] = 0;