~ubuntu-branches/ubuntu/precise/avrdude/precise

« back to all changes in this revision

Viewing changes to update.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-07-14 15:09:17 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090714150917-vthf96lweuevgtds
Tags: 5.8-1
* New upstream release.
* Bump Standards-Version to 3.8.2. No further changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
19
 */
20
20
 
21
 
/* $Id: update.c,v 1.1 2007/01/24 22:43:46 joerg_wunsch Exp $ */
 
21
/* $Id: update.c 819 2009-04-28 18:35:14Z joerg_wunsch $ */
22
22
 
23
23
#include <stdio.h>
24
24
#include <stdlib.h>
51
51
  p = s;
52
52
  while ((i < (sizeof(buf)-1) && *p && (*p != ':')))
53
53
    buf[i++] = *p++;
 
54
  buf[i] = 0;
54
55
 
55
56
  if (*p != ':') {
56
57
    upd->memtype = (char *)malloc(strlen("flash")+1);
69
70
    return upd;
70
71
  }
71
72
 
72
 
  buf[i] = 0;
73
 
 
74
73
  upd->memtype = (char *)malloc(strlen(buf)+1);
75
74
  if (upd->memtype == NULL) {
76
75
    fprintf(stderr, "%s: out of memory\n", progname);