src/stored/ansi_label.c
static bool same_label_names(char *bacula_name, char *ansi_name)
{
   char *a = ansi_name;
   char *b = bacula_name;
   /* Six characters max */
   for (int i=0; i < 6; i++) {
      if (*a == *b) {
         a++;
         b++;
         continue;
      }
      /* ANSI labels are blank filled, Bacula's are zero terminated */
      if (*a == ' ' && *b == 0) {
         return true;
      }
      return false;
   }
   /* Reached 6 characters */
   b++;
   if (*b == 0) {
      return true;
   }
   return false;
}
/* Check a Bacula Volume name against an ANSI Volume name */
Check a Bacula Volume name against an ANSI Volume name
Check a Bacula Volume name against an ANSI Volume name
static bool same_label_names(char *bacula_name, char *ansi_name)
{
   char *a = ansi_name;
   char *b = bacula_name;
   for (int i=0; i < 6; i++) {
      if (*a == *b) {
         a++;
         b++;
         continue;
      }
      if (*a == ' ' && *b == 0) {
         return true;
      }
      return false;
   }
   b++;
   if (*b == 0) {
      return true;
   }
   return false;
}
static bool same_label_names ( char * bacula_name , char * ansi_name ) { char * a = ansi_name ; char * b = bacula_name ; for ( int i = 0 ; i < 6 ; i ++ ) { if ( * a == * b ) { a ++ ; b ++ ; continue ; } if ( * a == ' ' && * b == 0 ) { return true ; } return false ; } b ++ ; if ( * b == 0 ) { return true ; } return false ; }
Check a Bacula Volume name against an ANSI Volume name
Check a Bacula Volume name against an ANSI Volume name
/* Six characters max */ /* ANSI labels are blank filled, Bacula's are zero terminated */ /* Reached 6 characters */