~ubuntu-branches/ubuntu/oneiric/gnutls26/oneiric

« back to all changes in this revision

Viewing changes to gl/snprintf.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* Formatted output to strings.
2
 
   Copyright (C) 2004, 2006-2008 Free Software Foundation, Inc.
 
2
   Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
3
3
   Written by Simon Josefsson and Paul Eggert.
4
4
 
5
5
   This program is free software; you can redistribute it and/or modify
53
53
  if (output != str)
54
54
    {
55
55
      if (size)
56
 
        {
57
 
          size_t pruned_len = (len < size ? len : size - 1);
58
 
          memcpy (str, output, pruned_len);
59
 
          str[pruned_len] = '\0';
60
 
        }
 
56
        {
 
57
          size_t pruned_len = (len < size ? len : size - 1);
 
58
          memcpy (str, output, pruned_len);
 
59
          str[pruned_len] = '\0';
 
60
        }
61
61
 
62
62
      free (output);
63
63
    }