X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fusb_id%2Fusb_id.c;h=b7d67958c9a1bd6d4edec4902da1af95b3d30344;hb=9bd72b9b6b2645ea3c36ef0be9a070e8ff67904f;hp=f5ee7959246a8d3a93653497ad0441988915aba7;hpb=853ccc433c4d45c3e1da4336f87b458ed10311ca;p=elogind.git diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c index f5ee79592..b7d67958c 100644 --- a/extras/usb_id/usb_id.c +++ b/extras/usb_id/usb_id.c @@ -4,23 +4,13 @@ * Identify an USB (block) device * * Copyright (c) 2005 SUSE Linux Products GmbH, Germany + * * Author: * Hannes Reinecke * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation; either version 2.1 of the - * License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2 of the License. */ #include @@ -82,7 +72,7 @@ static void set_str(char *to, const char *from, size_t count) /* strip trailing whitespace */ len = strnlen(from, count); - while (isspace(from[len-1])) + while (len && isspace(from[len-1])) len--; /* strip leading whitespace */