/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/plymouth.c

  • Committer: Teddy Hogeborn
  • Date: 2013-12-15 22:21:28 UTC
  • Revision ID: teddy@recompile.se-20131215222128-k6f1wbl6lv4v0kd8
Suppress spurious warnings when needed.

* plugin-runner.c (main): Suppress warning by -Wsign-conversion
                          generated by FD_SET, FD_CLR and FD_ISSET in
                          GNU libc before version 2.16.
* plugins.d/mandos-client.c (start_mandos_communication): Suppress
  warning by -Wstrict-aliasing generated by IN6_IS_ADDR_LINKLOCAL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
  
85
85
  va_start(ap, formatstring);
86
86
  ret = vasprintf(&text, formatstring, ap);
87
 
  if(ret == -1){
 
87
  if (ret == -1){
88
88
    fprintf(stderr, "Mandos plugin %s: ",
89
89
            program_invocation_short_name);
90
90
    vfprintf(stderr, formatstring, ap);
179
179
    int i = 0;
180
180
    for (; argv[i]!=NULL; i++){
181
181
      tmp = realloc(new_argv, sizeof(const char *) * ((size_t)i + 1));
182
 
      if(tmp == NULL){
 
182
      if (tmp == NULL){
183
183
        error_plus(0, errno, "realloc");
184
184
        free(new_argv);
185
185
        _exit(EX_OSERR);
290
290
  if(proc_id == 0){
291
291
    struct dirent **direntries = NULL;
292
292
    ret = scandir("/proc", &direntries, is_plymouth, alphasort);
293
 
    if(ret == -1){
 
293
    if (ret == -1){
294
294
      error_plus(0, errno, "scandir");
295
295
    }
296
 
    if(ret > 0){
 
296
    if (ret > 0){
297
297
      ret = sscanf(direntries[0]->d_name, "%" SCNuMAX, &proc_id);
298
 
      if(ret < 0){
 
298
      if (ret < 0){
299
299
        error_plus(0, errno, "sscanf");
300
300
      }
301
301
    }