~ubuntu-branches/ubuntu/raring/gnupg2/raring-security

« back to all changes in this revision

Viewing changes to common/session-env.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2011-05-25 14:27:35 UTC
  • mfrom: (1.2.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20110525142735-cn6ql0n73iqyrf10
Tags: upstream-2.0.17
ImportĀ upstreamĀ versionĀ 2.0.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
      else if (!strncmp (se->array[idx]->name, string, namelen)
184
184
               && strlen (se->array[idx]->name) == namelen)
185
185
        {
186
 
          /* Check if the value is the same; no need to update it,
187
 
             except for updating the default flag.  */
188
186
          if (strlen (se->array[idx]->value) == valuelen)
189
187
            {
 
188
              /* The new value has the same length.  We can update it
 
189
                 in-place.  */
 
190
              memcpy (se->array[idx]->value, value, valuelen);
190
191
              se->array[idx]->is_default = !!set_default;
191
192
              return 0;
192
193
            }